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/tools/series.hpp>
7 // #includes all the files that it needs to.
8 //
9 #include <boost/math/tools/series.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 struct Functor
17 {
18 typedef double result_type;
19 double operator()();
20 };
21 #define U double
22
23 Functor func;
24 boost::uintmax_t uim = 0;
25
compile_and_link_test()26 void compile_and_link_test()
27 {
28 check_result<Functor::result_type>(boost::math::tools::sum_series<Functor>(func, i));
29 check_result<Functor::result_type>(boost::math::tools::sum_series<Functor>(func, i, uim));
30 check_result<Functor::result_type>(boost::math::tools::sum_series<Functor, U>(func, i, d));
31 check_result<Functor::result_type>(boost::math::tools::sum_series<Functor, U>(func, i, uim, d));
32 check_result<Functor::result_type>(boost::math::tools::kahan_sum_series<Functor>(func, i));
33 check_result<Functor::result_type>(boost::math::tools::kahan_sum_series<Functor>(func, i, uim));
34 }
35
36