|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77040 - trunk/libs/conversion/test
From: antoshkka_at_[hidden]
Date: 2012-02-16 12:57:53
Author: apolukhin
Date: 2012-02-16 12:57:52 EST (Thu, 16 Feb 2012)
New Revision: 77040
URL: http://svn.boost.org/trac/boost/changeset/77040
Log:
More tests for fixed #5689 (issue mentiond in 5th comment)
Text files modified:
trunk/libs/conversion/test/lexical_cast_inf_nan_test.cpp | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
Modified: trunk/libs/conversion/test/lexical_cast_inf_nan_test.cpp
==============================================================================
--- trunk/libs/conversion/test/lexical_cast_inf_nan_test.cpp (original)
+++ trunk/libs/conversion/test/lexical_cast_inf_nan_test.cpp 2012-02-16 12:57:52 EST (Thu, 16 Feb 2012)
@@ -85,6 +85,12 @@
BOOST_CHECK( is_pos_inf( lexical_cast<test_t>("+infinity") ) );
BOOST_CHECK( is_pos_inf( lexical_cast<test_t>("+INFINITY") ) );
+ BOOST_CHECK( is_pos_inf( lexical_cast<test_t>("iNfiNity") ) );
+ BOOST_CHECK( is_pos_inf( lexical_cast<test_t>("INfinity") ) );
+
+ BOOST_CHECK( is_neg_inf( lexical_cast<test_t>("-inFINITY") ) );
+ BOOST_CHECK( is_neg_inf( lexical_cast<test_t>("-INFINITY") ) );
+
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("nan") ) );
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("NAN") ) );
@@ -94,6 +100,15 @@
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("+nan") ) );
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("+NAN") ) );
+ BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("nAn") ) );
+ BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("NaN") ) );
+
+ BOOST_CHECK( is_neg_nan( lexical_cast<test_t>("-nAn") ) );
+ BOOST_CHECK( is_neg_nan( lexical_cast<test_t>("-NaN") ) );
+
+ BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("+Nan") ) );
+ BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("+nAN") ) );
+
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("nan()") ) );
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>("NAN(some string)") ) );
BOOST_CHECK_THROW( lexical_cast<test_t>("NAN(some string"), bad_lexical_cast );
@@ -127,6 +142,12 @@
BOOST_CHECK( is_pos_inf( lexical_cast<test_t>(L"+infinity") ) );
BOOST_CHECK( is_pos_inf( lexical_cast<test_t>(L"+INFINITY") ) );
+ BOOST_CHECK( is_neg_inf( lexical_cast<test_t>(L"-infINIty") ) );
+ BOOST_CHECK( is_neg_inf( lexical_cast<test_t>(L"-INFiniTY") ) );
+
+ BOOST_CHECK( is_pos_inf( lexical_cast<test_t>(L"+inFINIty") ) );
+ BOOST_CHECK( is_pos_inf( lexical_cast<test_t>(L"+INfinITY") ) );
+
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>(L"nan") ) );
BOOST_CHECK( is_pos_nan( lexical_cast<test_t>(L"NAN") ) );
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