test_ellint_2.cpp 1.4 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 https://www.boost.org/LICENSE_1_0.txt
  5. #include "setup.hpp"
  6. #include "table_type.hpp"
  7. #define TEST_UDT
  8. #include <boost/math/special_functions/math_fwd.hpp>
  9. #include "libs/math/test/test_ellint_2.hpp"
  10. void expected_results()
  11. {
  12. //
  13. // Define the max and mean errors expected for
  14. // various compilers and platforms.
  15. //
  16. add_expected_result(
  17. ".*", // compiler
  18. ".*", // stdlib
  19. ".*", // platform
  20. ".*", // test type(s)
  21. ".*", // test data group
  22. ".*", 300, 200); // test function
  23. //
  24. // Finish off by printing out the compiler/stdlib/platform names,
  25. // we do this to make it easier to mark up expected error rates.
  26. //
  27. std::cout << "Tests run with " << BOOST_COMPILER << ", "
  28. << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
  29. }
  30. template <class T>
  31. void test(T t, const char* p)
  32. {
  33. test_spots(t, p);
  34. }
  35. BOOST_AUTO_TEST_CASE(test_main)
  36. {
  37. using namespace boost::multiprecision;
  38. expected_results();
  39. //
  40. // Test at:
  41. // 18 decimal digits: tests 80-bit long double approximations
  42. // 30 decimal digits: tests 128-bit long double approximations
  43. // 35 decimal digits: tests arbitrary precision code
  44. //
  45. ALL_TESTS
  46. }