Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71368 - trunk/libs/math/test
From: pbristow_at_[hidden]
Date: 2011-04-18 12:12:15


Author: pbristow
Date: 2011-04-18 12:12:14 EDT (Mon, 18 Apr 2011)
New Revision: 71368
URL: http://svn.boost.org/trac/boost/changeset/71368

Log:
Johan Rade tests for nonfinites.
Text files modified:
   trunk/libs/math/test/test_lexical_cast.cpp | 2 +-
   trunk/libs/math/test/test_nonfinite_trap.cpp | 19 +++++++++++--------
   trunk/libs/math/test/test_signed_zero.cpp | 5 ++++-
   3 files changed, 16 insertions(+), 10 deletions(-)

Modified: trunk/libs/math/test/test_lexical_cast.cpp
==============================================================================
--- trunk/libs/math/test/test_lexical_cast.cpp (original)
+++ trunk/libs/math/test/test_lexical_cast.cpp 2011-04-18 12:12:14 EDT (Mon, 18 Apr 2011)
@@ -19,7 +19,7 @@
 #include <boost/test/auto_unit_test.hpp>
 
 #include <boost/math/special_functions/nonfinite_num_facets.hpp>
-#include <boost/math/special_functions/signbit.hpp>
+#include <boost/math/special_functions/sign.hpp>
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "almost_equal.ipp"
 #include "S_.ipp"

Modified: trunk/libs/math/test/test_nonfinite_trap.cpp
==============================================================================
--- trunk/libs/math/test/test_nonfinite_trap.cpp (original)
+++ trunk/libs/math/test/test_nonfinite_trap.cpp 2011-04-18 12:12:14 EDT (Mon, 18 Apr 2011)
@@ -1,4 +1,5 @@
 // Copyright (c) 2006 Johan Rade
+// Copyright (c) 2011 Paul A. Bristow To incorporate into Boost.Math
 
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
@@ -8,12 +9,14 @@
 # pragma warning(disable : 4702)
 #endif
 
+#define BOOST_TEST_MAIN
+
 #include <locale>
 #include <sstream>
 #include <boost/test/auto_unit_test.hpp>
-#include "almost_equal.hpp"
-#include "S_.hpp"
-#include "../../../../boost/math/nonfinite_num_facets.hpp"
+#include "almost_equal.ipp"
+#include "S_.ipp"
+#include <boost/math/special_functions/nonfinite_num_facets.hpp>
 
 namespace {
 
@@ -35,7 +38,7 @@
 {
     trap_test_finite();
     trap_test_inf();
- trap_test_nan();
+ trap_test_nan();
 }
 
 //------------------------------------------------------------------------------
@@ -122,13 +125,13 @@
 
     ValType a1 = std::numeric_limits<ValType>::infinity();
     ss << a1;
- BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
+ BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
         || ss.rdstate() == std::ios_base::badbit);
     ss.clear();
 
     ValType a2 = -std::numeric_limits<ValType>::infinity();
     ss << a2;
- BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
+ BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
         || ss.rdstate() == std::ios_base::badbit);
 }
 
@@ -191,13 +194,13 @@
 
     ValType a1 = std::numeric_limits<ValType>::quiet_NaN();
     ss << a1;
- BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
+ BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
         || ss.rdstate() == std::ios_base::badbit);
     ss.clear();
 
     ValType a2 = std::numeric_limits<ValType>::signaling_NaN();
     ss << a2;
- BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
+ BOOST_CHECK(ss.rdstate() == std::ios_base::failbit
         || ss.rdstate() == std::ios_base::badbit);
 }
 

Modified: trunk/libs/math/test/test_signed_zero.cpp
==============================================================================
--- trunk/libs/math/test/test_signed_zero.cpp (original)
+++ trunk/libs/math/test/test_signed_zero.cpp 2011-04-18 12:12:14 EDT (Mon, 18 Apr 2011)
@@ -1,4 +1,5 @@
 // Copyright (c) 2006 Johan Rade
+// Copyright (c) 2011 Paul A. Bristow To incorporate into Boost.Math
 
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
@@ -8,13 +9,15 @@
 # pragma warning(disable : 4702)
 #endif
 
+#define BOOST_TEST_MAIN
+
 #include <iomanip>
 #include <locale>
 #include <sstream>
 #include <boost/test/auto_unit_test.hpp>
 #include "almost_equal.ipp"
 #include "S_.ipp"
-#include "../../../../boost/math/nonfinite_num_facets.hpp"
+#include <boost/math/special_functions/nonfinite_num_facets.hpp>
 
 namespace {
 


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