Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79471 - trunk/libs/config/test
From: john_at_[hidden]
Date: 2012-07-13 12:13:26


Author: johnmaddock
Date: 2012-07-13 12:13:26 EDT (Fri, 13 Jul 2012)
New Revision: 79471
URL: http://svn.boost.org/trac/boost/changeset/79471

Log:
Don't test inequality of NaN's unless IEE compliance is claimed.
Text files modified:
   trunk/libs/config/test/limits_test.cpp | 7 +++++--
   1 files changed, 5 insertions(+), 2 deletions(-)

Modified: trunk/libs/config/test/limits_test.cpp
==============================================================================
--- trunk/libs/config/test/limits_test.cpp (original)
+++ trunk/libs/config/test/limits_test.cpp 2012-07-13 12:13:26 EDT (Fri, 13 Jul 2012)
@@ -154,9 +154,12 @@
     // If one of these fail, your compiler may be optimizing incorrectly,
     // or the standard library is incorrectly configured.
     BOOST_CHECK(! (qnan == 42));
- BOOST_CHECK(! (qnan == qnan));
     BOOST_CHECK(qnan != 42);
- BOOST_CHECK(qnan != qnan);
+ if(lim::is_iec559)
+ {
+ BOOST_CHECK(! (qnan == qnan));
+ BOOST_CHECK(qnan != qnan);
+ }
 
     // The following tests may cause arithmetic traps.
     // BOOST_CHECK(! (qnan < 42));


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