1 // Copyright John Maddock 2006.
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/modf.hpp>
7 // #includes all the files that it needs to.
8 //
9 #include <boost/math/special_functions/modf.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
16 float ff;
17 double dd;
18 long double lldd;
19
20 int ii;
21 long ll;
22 #ifdef BOOST_HAS_LONG_LONG
23 boost::long_long_type llll;
24 #endif
25
compile_and_link_test()26 void compile_and_link_test()
27 {
28 check_result<float>(boost::math::modf(f, &ff));
29 check_result<double>(boost::math::modf(d, &dd));
30 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
31 check_result<long double>(boost::math::modf(l, &lldd));
32 #endif
33 check_result<float>(boost::math::modf(f, &ii));
34 check_result<double>(boost::math::modf(d, &ii));
35 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
36 check_result<long double>(boost::math::modf(l, &ii));
37 #endif
38 check_result<float>(boost::math::modf(f, &ll));
39 check_result<double>(boost::math::modf(d, &ll));
40 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
41 check_result<long double>(boost::math::modf(l, &ll));
42 #endif
43 #ifdef BOOST_HAS_LONG_LONG
44 check_result<float>(boost::math::modf(f, &llll));
45 check_result<double>(boost::math::modf(d, &llll));
46 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
47 check_result<long double>(boost::math::modf(l, &llll));
48 #endif
49 #endif
50 }
51