From d723c18fff9863f001db0a9a115794113315f0dd Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 12 Aug 2013 16:06:59 +0000 Subject: [PATCH] Update explicit failures markup and lexical_cast_float_types_test.cpp: do not run some checks when libc++ is used, but do expect other checks to pass well. [SVN r85322] --- test/lexical_cast_float_types_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lexical_cast_float_types_test.cpp b/test/lexical_cast_float_types_test.cpp index aafee05..0179865 100755 --- a/test/lexical_cast_float_types_test.cpp +++ b/test/lexical_cast_float_types_test.cpp @@ -297,12 +297,16 @@ void test_float_typess_for_overflows() BOOST_CHECK_CLOSE_FRACTION(maxvalue, lexical_cast(maxvalue), (std::numeric_limits::epsilon())); BOOST_CHECK_CLOSE_FRACTION(maxvalue, lexical_cast(s_max_value), (std::numeric_limits::epsilon())); +#ifndef _LIBCPP_VERSION + // libc++ had a bug in implementation of stream conversions for values that must be represented as infinity. + // http://llvm.org/bugs/show_bug.cgi?id=15723#c4 BOOST_CHECK_THROW(lexical_cast(s_max_value+"1"), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast(s_max_value+"9"), bad_lexical_cast); - // VC9 can fail the fllowing tests on floats and doubles when using stingstream... + // VC9 can fail the following tests on floats and doubles when using stingstream... BOOST_CHECK_THROW(lexical_cast("1"+s_max_value), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast("9"+s_max_value), bad_lexical_cast); +#endif if ( is_same::value ) {