tools_test_inc_test.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. //
  15. inline void check_result_imp(boost::math::tools::test_result<double>, boost::math::tools::test_result<double>){}
  16. #include "test_compile_result.hpp"
  17. void compile_and_link_test()
  18. {
  19. check_result<float>(boost::math::tools::relative_error<float>(f, f));
  20. #define A boost::array<boost::array<double, 2>, 2>
  21. typedef double (*F1)(const boost::array<double, 2>&);
  22. typedef F1 F2;
  23. A a;
  24. F1 f1 = 0;
  25. F2 f2 = 0;
  26. check_result<boost::math::tools::test_result<
  27. boost::math::tools::calculate_result_type<A>::value_type> >
  28. (boost::math::tools::test<A, F1, F2>(a, f1, f2));
  29. }