Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2008-04-12 12:28:57


Author: johnmaddock
Date: 2008-04-12 12:28:57 EDT (Sat, 12 Apr 2008)
New Revision: 44351
URL: http://svn.boost.org/trac/boost/changeset/44351

Log:
Fix declaration order in dist_nc_beta_incl_test.cpp test.
Fix long long usage in sf_modf_incl_test.cpp.
Adjust failure rates in test_zeta.cpp to cope with HP aCC and 128-bit long doubles.
Text files modified:
   trunk/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp | 30 +++++++++++++++++++-----------
   trunk/libs/math/test/compile_test/sf_modf_incl_test.cpp | 2 ++
   trunk/libs/math/test/test_zeta.cpp | 2 +-
   3 files changed, 22 insertions(+), 12 deletions(-)

Modified: trunk/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp
==============================================================================
--- trunk/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp (original)
+++ trunk/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp 2008-04-12 12:28:57 EDT (Sat, 12 Apr 2008)
@@ -6,17 +6,13 @@
 // Basic sanity check that header <boost/math/distributions/non_central_beta.hpp>
 // #includes all the files that it needs to.
 //
-#include <boost/math/distributions/non_central_beta.hpp>
-//
-// Note this header includes no other headers, this is
-// important if this test is to be meaningful:
-//
-#include "test_compile_result.hpp"
-
-void check()
-{
- TEST_DIST_FUNC(non_central_beta)
-}
+// In order to pass our conceptual tests, we need to forward declare
+// those functoins that the non-central beta (deliberately) doesn't
+// implement. These declarations have to appear *before* the
+// non central beta is defined, otherwise two-phase lookup
+// won't find them :-(
+//
+#include <boost/math/distributions/fwd.hpp>
 
 namespace boost{ namespace math{
 
@@ -37,6 +33,18 @@
 
 }}
 
+#include <boost/math/distributions/non_central_beta.hpp>
+//
+// Note this header includes no other headers, this is
+// important if this test is to be meaningful:
+//
+#include "test_compile_result.hpp"
+
+void check()
+{
+ TEST_DIST_FUNC(non_central_beta)
+}
+
 template class boost::math::non_central_beta_distribution<float, boost::math::policies::policy<> >;
 template class boost::math::non_central_beta_distribution<double, boost::math::policies::policy<> >;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS

Modified: trunk/libs/math/test/compile_test/sf_modf_incl_test.cpp
==============================================================================
--- trunk/libs/math/test/compile_test/sf_modf_incl_test.cpp (original)
+++ trunk/libs/math/test/compile_test/sf_modf_incl_test.cpp 2008-04-12 12:28:57 EDT (Sat, 12 Apr 2008)
@@ -40,9 +40,11 @@
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    check_result<long double>(boost::math::modf(l, &ll));
 #endif
+#ifdef BOOST_HAS_LONG_LONG
    check_result<float>(boost::math::modf(f, &llll));
    check_result<double>(boost::math::modf(d, &llll));
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    check_result<long double>(boost::math::modf(l, &llll));
 #endif
+#endif
 }

Modified: trunk/libs/math/test/test_zeta.cpp
==============================================================================
--- trunk/libs/math/test/test_zeta.cpp (original)
+++ trunk/libs/math/test/test_zeta.cpp 2008-04-12 12:28:57 EDT (Sat, 12 Apr 2008)
@@ -79,7 +79,7 @@
       ".*", // platform
       largest_type, // test type(s)
       ".*", // test data group
- ".*", 2, 1); // test function
+ ".*", 3, 1); // test function
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib


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