• 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/bernoulli.hpp>
7 // #includes all the files that it needs to.
8 //
9 #include <ostream>
10 #include <boost/math/special_functions/bernoulli.hpp>
11 //
12 // Note this header includes no other headers, this is
13 // important if this test is to be meaningful:
14 //
15 #include "test_compile_result.hpp"
16 
compile_and_link_test()17 void compile_and_link_test()
18 {
19    check_result<float>(boost::math::bernoulli_b2n<float>(i));
20    check_result<double>(boost::math::bernoulli_b2n<double>(i));
21 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
22    check_result<long double>(boost::math::bernoulli_b2n<long double>(i));
23 #endif
24 
25    check_result<float>(boost::math::tangent_t2n<float>(i));
26    check_result<double>(boost::math::tangent_t2n<double>(i));
27 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
28    check_result<long double>(boost::math::tangent_t2n<long double>(i));
29 #endif
30 #ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
31    constexpr float ce_f = boost::math::unchecked_bernoulli_b2n<float>(2);
32    constexpr float ce_d = boost::math::unchecked_bernoulli_b2n<double>(2);
33    constexpr float ce_l = boost::math::unchecked_bernoulli_b2n<long double>(2);
34    std::ostream cnull(0);
35    cnull << ce_f << ce_d << ce_l << std::endl;
36 #endif
37 }
38