|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86721 - trunk/libs/conversion/test
From: antoshkka_at_[hidden]
Date: 2013-11-16 11:25:26
Author: apolukhin
Date: 2013-11-16 11:25:26 EST (Sat, 16 Nov 2013)
New Revision: 86721
URL: http://svn.boost.org/trac/boost/changeset/86721
Log:
Slightly modify one of the lexical_cast tests to see what is produced by the `to_str` method with libc++.
Text files modified:
trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
Modified: trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp
==============================================================================
--- trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp Sat Nov 16 08:43:29 2013 (r86720)
+++ trunk/libs/conversion/test/lexical_cast_integral_types_test.cpp 2013-11-16 11:25:26 EST (Sat, 16 Nov 2013) (r86721)
@@ -367,7 +367,17 @@
BOOST_CHECK( lexical_cast<T>("30000") == static_cast<T>(30000) );
}
+
test_conversion_from_integral_to_integral<T>();
+
+ // This is a part of test_conversion_from_integral_to_string<T>('0') method,
+ // but with BOOST_CHECK_EQUAL instead of BOOST_CHECK. It is required to see
+ // what is produced by the to_str<char>(t) method in situations when result
+ // is different. BOOST_CHECK does not work with wchat_t.
+ typedef std::numeric_limits<T> limits;
+ T t = (limits::min)();
+ BOOST_CHECK_EQUAL(lexical_cast<std::string>(t), to_str<char>(t));
+
test_conversion_from_integral_to_string<T>('0');
test_conversion_from_string_to_integral<T>('0');
#if !defined(BOOST_LCAST_NO_WCHAR_T)
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