sf_hankel_incl_test.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. inline void check_result_imp(std::complex<float>, std::complex<float>){}
  16. inline void check_result_imp(std::complex<double>, std::complex<double>){}
  17. inline void check_result_imp(std::complex<long double>, std::complex<long double>){}
  18. void compile_and_link_test()
  19. {
  20. check_result<std::complex<float> >(boost::math::cyl_hankel_1<float>(f, f));
  21. check_result<std::complex<double> >(boost::math::cyl_hankel_1<double>(d, d));
  22. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  23. check_result<std::complex<long double> >(boost::math::cyl_hankel_1<long double>(l, l));
  24. #endif
  25. check_result<std::complex<float> >(boost::math::cyl_hankel_2<float>(f, f));
  26. check_result<std::complex<double> >(boost::math::cyl_hankel_2<double>(d, d));
  27. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  28. check_result<std::complex<long double> >(boost::math::cyl_hankel_2<long double>(l, l));
  29. #endif
  30. check_result<std::complex<float> >(boost::math::sph_hankel_1<float>(f, f));
  31. check_result<std::complex<double> >(boost::math::sph_hankel_1<double>(d, d));
  32. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  33. check_result<std::complex<long double> >(boost::math::sph_hankel_1<long double>(l, l));
  34. #endif
  35. check_result<std::complex<float> >(boost::math::sph_hankel_2<float>(f, f));
  36. check_result<std::complex<double> >(boost::math::sph_hankel_2<double>(d, d));
  37. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  38. check_result<std::complex<long double> >(boost::math::sph_hankel_2<long double>(l, l));
  39. #endif
  40. }