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