From e0737c56c1e384e05064a0c6e1ac46979371041b Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 19 Dec 2018 22:58:32 +0100 Subject: New upstream version 2.0.0+repack --- boost/libs/math/test/test_policy_7.cpp | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 boost/libs/math/test/test_policy_7.cpp (limited to 'boost/libs/math/test/test_policy_7.cpp') diff --git a/boost/libs/math/test/test_policy_7.cpp b/boost/libs/math/test/test_policy_7.cpp new file mode 100644 index 00000000..99792cea --- /dev/null +++ b/boost/libs/math/test/test_policy_7.cpp @@ -0,0 +1,44 @@ + +// Copyright John Maddock 2007. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#define BOOST_TEST_MAIN +#include // for test_main +#include + +template +bool check_same(const P1&, const P2&) +{ + if(!boost::is_same::value) + { + std::cout << "P1 = " << typeid(P1).name() << std::endl; + std::cout << "P2 = " << typeid(P2).name() << std::endl; + } + return boost::is_same::value; +} + + +BOOST_AUTO_TEST_CASE( test_main ) +{ + using namespace boost::math::policies; + using namespace boost; + + BOOST_CHECK(check_same(make_policy(), policy<>())); + BOOST_CHECK(check_same(make_policy(denorm_error()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(digits2<20>()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(promote_float()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(domain_error()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(pole_error()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(indeterminate_result_error()), normalise > >::type())); + + +} // BOOST_AUTO_TEST_CASE( test_main ) + + + -- cgit v1.2.3