test_jacobi.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright John Maddock 2006-15.
  2. // Copyright Paul A. Bristow 2007
  3. // Use, modification and distribution are subject to the
  4. // Boost Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #include "bindings.hpp"
  7. #include "../../test/test_jacobi.hpp"
  8. #include <boost/math/special_functions/jacobi_elliptic.hpp>
  9. BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
  10. BOOST_AUTO_TEST_CASE(test_main)
  11. {
  12. BOOST_MATH_CONTROL_FP;
  13. error_stream_replacer rep;
  14. #ifdef TYPE_TO_TEST
  15. test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
  16. #else
  17. bool test_float = false;
  18. bool test_double = false;
  19. bool test_long_double = false;
  20. if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
  21. {
  22. //
  23. // Don't bother with long double, it's the same as double:
  24. //
  25. if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
  26. test_float = true;
  27. test_double = true;
  28. }
  29. else
  30. {
  31. if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
  32. test_float = true;
  33. if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
  34. test_double = true;
  35. test_long_double = true;
  36. }
  37. #ifdef ALWAYS_TEST_DOUBLE
  38. test_double = true;
  39. #endif
  40. if(test_float)
  41. test_spots(0.0f, "float");
  42. if(test_double)
  43. test_spots(0.0, "double");
  44. if(test_long_double)
  45. test_spots(0.0L, "long double");
  46. #ifdef BOOST_MATH_USE_FLOAT128
  47. //test_spots(0.0Q, "__float128");
  48. #endif
  49. #endif
  50. }