test_polygamma.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/polygamma.hpp>
  8. #include "libs/math/test/test_polygamma.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. ".*bug cases.*", // test data group
  21. ".*", 100000, 40000); // test function
  22. add_expected_result(
  23. ".*", // compiler
  24. ".*", // stdlib
  25. ".*", // platform
  26. ".*", // test type(s)
  27. ".*", // test data group
  28. ".*", 700, 400); // test function
  29. //
  30. // Finish off by printing out the compiler/stdlib/platform names,
  31. // we do this to make it easier to mark up expected error rates.
  32. //
  33. std::cout << "Tests run with " << BOOST_COMPILER << ", "
  34. << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
  35. }
  36. template <class T>
  37. void test(T t, const char* p)
  38. {
  39. test_polygamma(t, p);
  40. }
  41. BOOST_AUTO_TEST_CASE( test_main )
  42. {
  43. expected_results();
  44. ALL_TESTS
  45. }