Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78208 - trunk/libs/math/test
From: john_at_[hidden]
Date: 2012-04-26 11:48:44


Author: johnmaddock
Date: 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
New Revision: 78208
URL: http://svn.boost.org/trac/boost/changeset/78208

Log:
Fix up tests to not run real_concept tests when BOOST_MATH_NO_REAL_CONCEPT_TESTS is set.
Text files modified:
   trunk/libs/math/test/test_binomial.cpp | 2 +-
   trunk/libs/math/test/test_chi_squared.cpp | 2 +-
   trunk/libs/math/test/test_expint.cpp | 2 ++
   trunk/libs/math/test/test_gamma_dist.cpp | 2 +-
   trunk/libs/math/test/test_hypergeometric_dist.cpp | 2 ++
   trunk/libs/math/test/test_igamma.cpp | 2 +-
   trunk/libs/math/test/test_inv_hyp.cpp | 4 ++++
   trunk/libs/math/test/test_inverse_chi_squared_distribution.cpp | 2 +-
   trunk/libs/math/test/test_inverse_gamma_distribution.cpp | 2 +-
   trunk/libs/math/test/test_inverse_gaussian.cpp | 2 +-
   trunk/libs/math/test/test_nc_chi_squared.cpp | 2 +-
   trunk/libs/math/test/test_nc_t.cpp | 2 +-
   trunk/libs/math/test/test_negative_binomial.cpp | 2 +-
   trunk/libs/math/test/test_poisson.cpp | 4 ++--
   trunk/libs/math/test/test_sign.cpp | 4 +++-
   trunk/libs/math/test/test_skew_normal.cpp | 2 +-
   16 files changed, 24 insertions(+), 14 deletions(-)

Modified: trunk/libs/math/test/test_binomial.cpp
==============================================================================
--- trunk/libs/math/test/test_binomial.cpp (original)
+++ trunk/libs/math/test/test_binomial.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -729,7 +729,7 @@
 #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

Modified: trunk/libs/math/test/test_chi_squared.cpp
==============================================================================
--- trunk/libs/math/test/test_chi_squared.cpp (original)
+++ trunk/libs/math/test/test_chi_squared.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -535,7 +535,7 @@
   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

Modified: trunk/libs/math/test/test_expint.cpp
==============================================================================
--- trunk/libs/math/test/test_expint.cpp (original)
+++ trunk/libs/math/test/test_expint.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -144,7 +144,9 @@
    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 "

Modified: trunk/libs/math/test/test_gamma_dist.cpp
==============================================================================
--- trunk/libs/math/test/test_gamma_dist.cpp (original)
+++ trunk/libs/math/test/test_gamma_dist.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -223,7 +223,7 @@
   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

Modified: trunk/libs/math/test/test_hypergeometric_dist.cpp
==============================================================================
--- trunk/libs/math/test/test_hypergeometric_dist.cpp (original)
+++ trunk/libs/math/test/test_hypergeometric_dist.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -486,7 +486,9 @@
    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 "

Modified: trunk/libs/math/test/test_igamma.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma.cpp (original)
+++ trunk/libs/math/test/test_igamma.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -334,7 +334,7 @@
    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

Modified: trunk/libs/math/test/test_inv_hyp.cpp
==============================================================================
--- trunk/libs/math/test/test_inv_hyp.cpp (original)
+++ trunk/libs/math/test/test_inv_hyp.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -259,7 +259,9 @@
    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 @@
    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 "

Modified: trunk/libs/math/test/test_inverse_chi_squared_distribution.cpp
==============================================================================
--- trunk/libs/math/test/test_inverse_chi_squared_distribution.cpp (original)
+++ trunk/libs/math/test/test_inverse_chi_squared_distribution.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -191,7 +191,7 @@
   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);

Modified: trunk/libs/math/test/test_inverse_gamma_distribution.cpp
==============================================================================
--- trunk/libs/math/test/test_inverse_gamma_distribution.cpp (original)
+++ trunk/libs/math/test/test_inverse_gamma_distribution.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -402,7 +402,7 @@
   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

Modified: trunk/libs/math/test/test_inverse_gaussian.cpp
==============================================================================
--- trunk/libs/math/test/test_inverse_gaussian.cpp (original)
+++ trunk/libs/math/test/test_inverse_gaussian.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -344,7 +344,7 @@
   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

Modified: trunk/libs/math/test/test_nc_chi_squared.cpp
==============================================================================
--- trunk/libs/math/test/test_nc_chi_squared.cpp (original)
+++ trunk/libs/math/test/test_nc_chi_squared.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -542,7 +542,7 @@
 #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

Modified: trunk/libs/math/test/test_nc_t.cpp
==============================================================================
--- trunk/libs/math/test/test_nc_t.cpp (original)
+++ trunk/libs/math/test/test_nc_t.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -517,7 +517,7 @@
 #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

Modified: trunk/libs/math/test/test_negative_binomial.cpp
==============================================================================
--- trunk/libs/math/test/test_negative_binomial.cpp (original)
+++ trunk/libs/math/test/test_negative_binomial.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -819,7 +819,7 @@
 #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

Modified: trunk/libs/math/test/test_poisson.cpp
==============================================================================
--- trunk/libs/math/test/test_poisson.cpp (original)
+++ trunk/libs/math/test/test_poisson.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -600,11 +600,11 @@
 #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* [])

Modified: trunk/libs/math/test/test_sign.cpp
==============================================================================
--- trunk/libs/math/test/test_sign.cpp (original)
+++ trunk/libs/math/test/test_sign.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -33,7 +33,7 @@
 
    // 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 @@
    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 "

Modified: trunk/libs/math/test/test_skew_normal.cpp
==============================================================================
--- trunk/libs/math/test/test_skew_normal.cpp (original)
+++ trunk/libs/math/test/test_skew_normal.cpp 2012-04-26 11:48:42 EDT (Thu, 26 Apr 2012)
@@ -481,7 +481,7 @@
   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


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk