• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/test.hpp>
7 // #includes all the files that it needs to.
8 //
9 #include <boost/math/tools/test.hpp>
10 #include <boost/array.hpp>
11 //
12 // Note this header includes no other headers, this is
13 // important if this test is to be meaningful:
14 //
check_result_imp(boost::math::tools::test_result<double>,boost::math::tools::test_result<double>)15 inline void check_result_imp(boost::math::tools::test_result<double>, boost::math::tools::test_result<double>){}
16 
17 #include "test_compile_result.hpp"
18 
19 
compile_and_link_test()20 void compile_and_link_test()
21 {
22    check_result<float>(boost::math::tools::relative_error<float>(f, f));
23 
24    #define A boost::array<boost::array<double, 2>, 2>
25    typedef double (*F1)(const boost::array<double, 2>&);
26    typedef F1 F2;
27    A a;
28    F1 f1 = 0;
29    F2 f2 = 0;
30 
31    check_result<boost::math::tools::test_result<
32       boost::math::tools::calculate_result_type<A>::value_type> >
33       (boost::math::tools::test<A, F1, F2>(a, f1, f2));
34 
35 }
36 
37