Don't test inequality of NaN's unless IEE compliance is claimed.

[SVN r79471]
This commit is contained in:
John Maddock
2012-07-13 16:13:26 +00:00
parent 318629fbae
commit ecdb77c48a

View File

@ -154,9 +154,12 @@ void test_float_limits(const T &, const char * msg)
// If one of these fail, your compiler may be optimizing incorrectly, // If one of these fail, your compiler may be optimizing incorrectly,
// or the standard library is incorrectly configured. // or the standard library is incorrectly configured.
BOOST_CHECK(! (qnan == 42)); BOOST_CHECK(! (qnan == 42));
BOOST_CHECK(! (qnan == qnan));
BOOST_CHECK(qnan != 42); 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. // The following tests may cause arithmetic traps.
// BOOST_CHECK(! (qnan < 42)); // BOOST_CHECK(! (qnan < 42));