• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  Copyright John Maddock 2012.
2 //  Use, modification and distribution are subject to the
3 //  Boost Software License, Version 1.0. (See accompanying file
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 //
6 // Basic sanity check that header <boost/math/special_functions/bessel.hpp>
7 // #includes all the files that it needs to.
8 //
9 #include <boost/math/special_functions/hankel.hpp>
10 //
11 // Note this header includes no other headers, this is
12 // important if this test is to be meaningful:
13 //
14 #include "test_compile_result.hpp"
15 
check_result_imp(std::complex<float>,std::complex<float>)16 inline void check_result_imp(std::complex<float>, std::complex<float>){}
check_result_imp(std::complex<double>,std::complex<double>)17 inline void check_result_imp(std::complex<double>, std::complex<double>){}
check_result_imp(std::complex<long double>,std::complex<long double>)18 inline void check_result_imp(std::complex<long double>, std::complex<long double>){}
19 
compile_and_link_test()20 void compile_and_link_test()
21 {
22    check_result<std::complex<float> >(boost::math::cyl_hankel_1<float>(f, f));
23    check_result<std::complex<double> >(boost::math::cyl_hankel_1<double>(d, d));
24 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
25    check_result<std::complex<long double> >(boost::math::cyl_hankel_1<long double>(l, l));
26 #endif
27 
28    check_result<std::complex<float> >(boost::math::cyl_hankel_2<float>(f, f));
29    check_result<std::complex<double> >(boost::math::cyl_hankel_2<double>(d, d));
30 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
31    check_result<std::complex<long double> >(boost::math::cyl_hankel_2<long double>(l, l));
32 #endif
33 
34    check_result<std::complex<float> >(boost::math::sph_hankel_1<float>(f, f));
35    check_result<std::complex<double> >(boost::math::sph_hankel_1<double>(d, d));
36 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
37    check_result<std::complex<long double> >(boost::math::sph_hankel_1<long double>(l, l));
38 #endif
39 
40    check_result<std::complex<float> >(boost::math::sph_hankel_2<float>(f, f));
41    check_result<std::complex<double> >(boost::math::sph_hankel_2<double>(d, d));
42 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
43    check_result<std::complex<long double> >(boost::math::sph_hankel_2<long double>(l, l));
44 #endif
45 
46 }
47