Release 1.39.0
[boost.git] / Boost_1_39_0 / libs / math / test / compile_test / tools_series_inc_test.cpp
blob0a51905ee6005bcc6fb59b368462220e7c8c7489
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>
11 // Note this header includes no other headers, this is
12 // important if this test is to be meaningful:
14 #include "test_compile_result.hpp"
16 struct Functor
18 typedef double result_type;
19 double operator()();
21 #define U double
23 Functor func;
24 boost::uintmax_t uim = 0;
26 void check()
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));