From cb13210a12da30bf65bf3c3a22c8ad679676e888 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 24 Nov 2005 18:44:24 +0000 Subject: [PATCH] Update tests to provide more information, and disable tests that rely on long double overloads when those are known to be inaccurate. [SVN r31772] --- test/complex_test.cpp | 14 +++++++------- test/log1p_expm1_test.cpp | 7 ++++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/test/complex_test.cpp b/test/complex_test.cpp index e12fc0182..d998f5267 100644 --- a/test/complex_test.cpp +++ b/test/complex_test.cpp @@ -625,31 +625,31 @@ void check_spots(const T&) BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200); result = boost::math::atanh(ct(infinity, -pi)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200); result = boost::math::atanh(ct(-infinity, -pi)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200); result = boost::math::atanh(ct(-infinity, pi)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200); result = boost::math::atanh(ct(infinity, infinity)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200); result = boost::math::atanh(ct(infinity, -infinity)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200); result = boost::math::atanh(ct(-infinity, -infinity)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200); result = boost::math::atanh(ct(-infinity, infinity)); - BOOST_CHECK(result.real() == zero); + BOOST_CHECK_EQUAL(result.real(), zero); BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200); if(test_nan) diff --git a/test/log1p_expm1_test.cpp b/test/log1p_expm1_test.cpp index 36977fbd4..c5c7dffee 100644 --- a/test/log1p_expm1_test.cpp +++ b/test/log1p_expm1_test.cpp @@ -572,9 +572,14 @@ int test_main(int, char* []) // due to poor std lib support (not enough digits returned from // std::log and std::exp): // -#if !defined(__CYGWIN__) && !defined(__FreeBSD__) +#if !defined(__CYGWIN__) && !defined(__FreeBSD__) && !(defined(__GNUC__) && defined(__sun)) std::cout << "Running long double tests" << std::endl; test((long double)(0)); +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; #endif return 0; }