mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Fix up tests to not run real_concept tests when BOOST_MATH_NO_REAL_CONCEPT_TESTS is set.
[SVN r78208]
This commit is contained in:
@@ -729,7 +729,7 @@ int test_main(int, char* [])
|
||||
#ifdef TEST_LDOUBLE
|
||||
test_spots(0.0L); // Test long double.
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#if !defined(BOOST_MATH_NO_REAL_CONCEPT_TESTS)
|
||||
#ifdef TEST_REAL_CONCEPT
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
|
||||
@@ -535,7 +535,7 @@ int test_main(int, char* [])
|
||||
test_spots(0.0); // Test double.
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L); // Test long double.
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#if !defined(BOOST_MATH_NO_REAL_CONCEPT_TESTS)
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,9 @@ int test_main(int, char* [])
|
||||
test_expint(0.1, "double");
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_expint(0.1L, "long double");
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_expint(boost::math::concepts::real_concept(0.1), "real_concept");
|
||||
#endif
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
|
||||
@@ -223,7 +223,7 @@ int test_main(int, char* [])
|
||||
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L); // Test long double.
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
#else
|
||||
|
||||
@@ -486,7 +486,9 @@ int test_main(int, char* [])
|
||||
test_spots(0.0, "double"); // Test double. OK at decdigits 7, tolerance = 1e07 %
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L, "long double"); // Test long double.
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0), "real_concept"); // Test real_concept.
|
||||
#endif
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
|
||||
@@ -334,7 +334,7 @@ int test_main(int, char* [])
|
||||
test_spots(0.0);
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L);
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0.1));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -259,7 +259,9 @@ int test_main(int, char* [])
|
||||
test_spots(0.0, "double");
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L, "long double");
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0.1), "real_concept");
|
||||
#endif
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
@@ -271,7 +273,9 @@ int test_main(int, char* [])
|
||||
test_inv_hyperbolics(0.1, "double");
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_inv_hyperbolics(0.1L, "long double");
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_inv_hyperbolics(boost::math::concepts::real_concept(0.1), "real_concept");
|
||||
#endif
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
|
||||
@@ -191,7 +191,7 @@ void test_spots(RealType)
|
||||
BOOST_CHECK_CLOSE_FRACTION(variance(dist10), static_cast<RealType>(0.0052083333333333333333333333333333333333333333333333L), tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(mode(dist10), static_cast<RealType>(0.08333333333333333333333333333333333333333333333L), tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(median(dist10), static_cast<RealType>(0.10704554778227709530244586234274024205738435512468L), tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(cdf(dist10, median(dist10)), static_cast<RealType>(0.5L), tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(cdf(dist10, median(dist10)), static_cast<RealType>(0.5L), 4 * tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(skewness(dist10), static_cast<RealType>(3.4641016151377545870548926830117447338856105076208L), tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(kurtosis(dist10), static_cast<RealType>(45), tol_2eps);
|
||||
BOOST_CHECK_CLOSE_FRACTION(kurtosis_excess(dist10), static_cast<RealType>(45-3), tol_2eps);
|
||||
|
||||
@@ -402,7 +402,7 @@ int test_main(int, char* [])
|
||||
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L); // Test long double.
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
#else
|
||||
|
||||
@@ -344,7 +344,7 @@ int test_main(int, char* [])
|
||||
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L); // Test long double.
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
#else
|
||||
|
||||
@@ -542,7 +542,7 @@ int test_main(int, char* [])
|
||||
#ifdef TEST_LDOUBLE
|
||||
test_accuracy(0.0L, "long double"); // Test long double.
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
#ifdef TEST_REAL_CONCEPT
|
||||
test_accuracy(boost::math::concepts::real_concept(0.), "real_concept"); // Test real concept.
|
||||
#endif
|
||||
|
||||
@@ -517,7 +517,7 @@ int test_main(int, char* [])
|
||||
#ifdef TEST_LDOUBLE
|
||||
test_accuracy(0.0L, "long double"); // Test long double.
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
#ifdef TEST_REAL_CONCEPT
|
||||
test_accuracy(boost::math::concepts::real_concept(0.), "real_concept"); // Test real concept.
|
||||
#endif
|
||||
|
||||
@@ -819,7 +819,7 @@ int test_main(int, char* [])
|
||||
#ifdef TEST_LDOUBLE
|
||||
test_spots(0.0L); // Test long double.
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
#ifdef TEST_REAL_CONCEPT
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
|
||||
@@ -600,11 +600,11 @@ int test_main(int, char* [])
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
#ifdef TEST_REAL_CONCEPT
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
} // int test_main(int, char* [])
|
||||
|
||||
@@ -33,7 +33,7 @@ void test_spots(RealType /*T*/, const char* /*type_name*/)
|
||||
|
||||
// Compare to formula for changsign(x) = copysign(x, signbit(x) ? 1.0 : -1.0)
|
||||
BOOST_CHECK_EQUAL((boost::math::changesign)(b),
|
||||
boost::math::copysign(b, boost::math::signbit(b) ? RealType(1.) : RealType(-1.) ));
|
||||
(boost::math::copysign)(b, boost::math::signbit(b) ? RealType(1.) : RealType(-1.) ));
|
||||
|
||||
|
||||
BOOST_CHECK_EQUAL((boost::math::copysign)(b, a), RealType(1));
|
||||
@@ -146,7 +146,9 @@ int test_main(int, char* [])
|
||||
test_spots(0.0, "double"); // Test double. OK at decdigits 7, tolerance = 1e07 %
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L, "long double"); // Test long double.
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0), "real_concept"); // Test real_concept.
|
||||
#endif
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
|
||||
@@ -481,7 +481,7 @@ int test_main(int, char* [])
|
||||
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test_spots(0.0L); // Test long double.
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0582))
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
|
||||
#endif
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user