test_bessel_j_prime.cpp 1.6 KB

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