Boost logo

Boost-Commit :

From: johnmaddock_at_[hidden]
Date: 2007-06-19 06:52:54


Author: johnmaddock
Date: 2007-06-19 06:52:53 EDT (Tue, 19 Jun 2007)
New Revision: 7100
URL: http://svn.boost.org/trac/boost/changeset/7100

Log:
Updated tests to cope with policy framework.

Text files modified:
   sandbox/math_toolkit/policy/libs/math/test/log1p_expm1_test.cpp | 6 ++++++
   sandbox/math_toolkit/policy/libs/math/test/test_gamma.cpp | 10 ++++++++++
   2 files changed, 16 insertions(+), 0 deletions(-)

Modified: sandbox/math_toolkit/policy/libs/math/test/log1p_expm1_test.cpp
==============================================================================
--- sandbox/math_toolkit/policy/libs/math/test/log1p_expm1_test.cpp (original)
+++ sandbox/math_toolkit/policy/libs/math/test/log1p_expm1_test.cpp 2007-06-19 06:52:53 EDT (Tue, 19 Jun 2007)
@@ -3,14 +3,18 @@
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
 #include <boost/math/concepts/real_concept.hpp>
 #include <boost/test/included/test_exec_monitor.hpp>
 #include <boost/test/floating_point_comparison.hpp>
 #include <boost/math/special_functions/log1p.hpp>
 #include <boost/math/special_functions/expm1.hpp>
 #include <boost/array.hpp>
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
 #include <boost/lambda/lambda.hpp>
 #include <boost/lambda/bind.hpp>
+#endif
 
 #include "handle_test_result.hpp"
 
@@ -65,6 +69,7 @@
 template <class T>
 void do_test(const T& data, const char* type_name, const char* test_name)
 {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    typedef typename T::value_type row_type;
    typedef typename row_type::value_type value_type;
 
@@ -96,6 +101,7 @@
       boost::lambda::ret<value_type>(boost::lambda::_1[2]));
    handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::expm1", "log1p and expm1");
    std::cout << std::endl;
+#endif
 }
 
 template <class T>

Modified: sandbox/math_toolkit/policy/libs/math/test/test_gamma.cpp
==============================================================================
--- sandbox/math_toolkit/policy/libs/math/test/test_gamma.cpp (original)
+++ sandbox/math_toolkit/policy/libs/math/test/test_gamma.cpp 2007-06-19 06:52:53 EDT (Tue, 19 Jun 2007)
@@ -3,6 +3,8 @@
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
 #include <boost/math/concepts/real_concept.hpp>
 #include <boost/math/special_functions/gamma.hpp>
 #include <boost/test/included/test_exec_monitor.hpp>
@@ -12,8 +14,10 @@
 #include <boost/math/constants/constants.hpp>
 #include <boost/type_traits/is_floating_point.hpp>
 #include <boost/array.hpp>
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
 #include <boost/lambda/lambda.hpp>
 #include <boost/lambda/bind.hpp>
+#endif
 
 #include "test_gamma_hooks.hpp"
 #include "handle_test_result.hpp"
@@ -267,6 +271,7 @@
 template <class T>
 void do_test_gamma(const T& data, const char* type_name, const char* test_name)
 {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    typedef typename T::value_type row_type;
    typedef typename row_type::value_type value_type;
 
@@ -317,11 +322,13 @@
 #endif
 
    std::cout << std::endl;
+#endif
 }
 
 template <class T>
 void do_test_gammap1m1(const T& data, const char* type_name, const char* test_name)
 {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    typedef typename T::value_type row_type;
    typedef typename row_type::value_type value_type;
 
@@ -342,6 +349,7 @@
       boost::lambda::ret<value_type>(boost::lambda::_1[1]));
    handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::tgamma1pm1", test_name);
    std::cout << std::endl;
+#endif
 }
 
 template <class T>
@@ -435,8 +443,10 @@
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    test_gamma(0.1L, "long double");
 #ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    test_gamma(boost::math::concepts::real_concept(0.1), "real_concept");
 #endif
+#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 "


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