test_trigamma.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2011 John Maddock. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
  5. #include "setup.hpp"
  6. #include "table_type.hpp"
  7. #include <boost/math/special_functions/trigamma.hpp>
  8. #include "libs/math/test/test_trigamma.hpp"
  9. void expected_results()
  10. {
  11. //
  12. // Define the max and mean errors expected for
  13. // various compilers and platforms.
  14. //
  15. add_expected_result(
  16. ".*", // compiler
  17. ".*", // stdlib
  18. ".*", // platform
  19. ".*", // test type(s)
  20. ".*", // test data group
  21. ".*", 2, 2); // test function
  22. //
  23. // Finish off by printing out the compiler/stdlib/platform names,
  24. // we do this to make it easier to mark up expected error rates.
  25. //
  26. std::cout << "Tests run with " << BOOST_COMPILER << ", "
  27. << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
  28. }
  29. template <class T>
  30. void test(T t, const char* p)
  31. {
  32. test_trigamma(t, p);
  33. }
  34. BOOST_AUTO_TEST_CASE( test_main )
  35. {
  36. expected_results();
  37. ALL_TESTS
  38. }