test_carlson.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_carlson.hpp"
  8. #include <boost/math/special_functions/ellint_rc.hpp>
  9. #include <boost/math/special_functions/ellint_rg.hpp>
  10. #include <boost/math/special_functions/ellint_rf.hpp>
  11. #include <boost/math/special_functions/ellint_rd.hpp>
  12. #include <boost/math/special_functions/ellint_rj.hpp>
  13. BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
  14. BOOST_AUTO_TEST_CASE(test_main)
  15. {
  16. BOOST_MATH_CONTROL_FP;
  17. error_stream_replacer rep;
  18. #ifdef TYPE_TO_TEST
  19. test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
  20. #else
  21. bool test_float = false;
  22. bool test_double = false;
  23. bool test_long_double = false;
  24. if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
  25. {
  26. //
  27. // Don't bother with long double, it's the same as double:
  28. //
  29. if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
  30. test_float = true;
  31. test_double = true;
  32. }
  33. else
  34. {
  35. if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
  36. test_float = true;
  37. if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
  38. test_double = true;
  39. test_long_double = true;
  40. }
  41. #ifdef ALWAYS_TEST_DOUBLE
  42. test_double = true;
  43. #endif
  44. if(test_float)
  45. test_spots(0.0f, "float");
  46. if(test_double)
  47. test_spots(0.0, "double");
  48. if(test_long_double)
  49. test_spots(0.0L, "long double");
  50. #ifdef BOOST_MATH_USE_FLOAT128
  51. //test_spots(0.0Q, "__float128");
  52. #endif
  53. #endif
  54. }