|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83764 - branches/release/libs/conversion/test
From: antoshkka_at_[hidden]
Date: 2013-04-04 11:47:03
Author: apolukhin
Date: 2013-04-04 11:47:02 EDT (Thu, 04 Apr 2013)
New Revision: 83764
URL: http://svn.boost.org/trac/boost/changeset/83764
Log:
Mrege from trunk:
* Disable UTF16 and UTF32 tests for libc++ (fixes #8369)
Text files modified:
branches/release/libs/conversion/test/lexical_cast_arrays_test.cpp | 20 ++++++++++++++------
branches/release/libs/conversion/test/lexical_cast_integral_types_test.cpp | 4 ++--
branches/release/libs/conversion/test/lexical_cast_iterator_range_test.cpp | 17 +++++++++++++----
3 files changed, 29 insertions(+), 12 deletions(-)
Modified: branches/release/libs/conversion/test/lexical_cast_arrays_test.cpp
==============================================================================
--- branches/release/libs/conversion/test/lexical_cast_arrays_test.cpp (original)
+++ branches/release/libs/conversion/test/lexical_cast_arrays_test.cpp 2013-04-04 11:47:02 EDT (Thu, 04 Apr 2013)
@@ -22,6 +22,14 @@
using namespace boost;
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(_LIBCPP_VERSION)
+#define BOOST_LC_RUNU16
+#endif
+
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(_LIBCPP_VERSION)
+#define BOOST_LC_RUNU32
+#endif
+
boost::unit_test::test_suite *init_unit_test_suite(int, char *[])
{
unit_test::test_suite *suite =
@@ -91,7 +99,7 @@
#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#ifdef BOOST_LC_RUNU16
typedef ArrayT<char16_t, 300> u16arr_type;
typedef ArrayT<char16_t, 3> u16short_arr_type;
std::u16string u16ethalon(u"100");
@@ -109,7 +117,7 @@
BOOST_CHECK_THROW(lexical_cast<u16short_arr_type>(val), boost::bad_lexical_cast);
#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#ifdef BOOST_LC_RUNU32
typedef ArrayT<char32_t, 300> u32arr_type;
typedef ArrayT<char32_t, 3> u32short_arr_type;
std::u32string u32ethalon(U"100");
@@ -190,7 +198,7 @@
#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#ifdef BOOST_LC_RUNU16
typedef ArrayT<char16_t, 300> u16arr_type;
typedef ArrayT<char16_t, 3> u16short_arr_type;
std::u16string u16ethalon(u"100");
@@ -217,7 +225,7 @@
BOOST_CHECK_THROW(lexical_cast<u16short_arr_type>(val), boost::bad_lexical_cast);
#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#ifdef BOOST_LC_RUNU32
typedef ArrayT<char32_t, 300> u32arr_type;
typedef ArrayT<char32_t, 3> u32short_arr_type;
std::u32string u32ethalon(U"100");
@@ -328,7 +336,7 @@
}
#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#ifdef BOOST_LC_RUNU16
{
const ArrayT<const char16_t, 4> var_zero_terminated_const_var_const_char = {{ u'1', u'0', u'0', u'\0'}};
BOOST_CHECK(lexical_cast<std::u16string>(var_zero_terminated_const_var_const_char) == u"100");
@@ -339,7 +347,7 @@
}
#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#ifdef BOOST_LC_RUNU32
{
const ArrayT<const char32_t, 4> var_zero_terminated_const_var_const_char = {{ U'1', U'0', U'0', U'\0'}};
BOOST_CHECK(lexical_cast<std::u32string>(var_zero_terminated_const_var_const_char) == U"100");
Modified: branches/release/libs/conversion/test/lexical_cast_integral_types_test.cpp
==============================================================================
--- branches/release/libs/conversion/test/lexical_cast_integral_types_test.cpp (original)
+++ branches/release/libs/conversion/test/lexical_cast_integral_types_test.cpp 2013-04-04 11:47:02 EDT (Thu, 04 Apr 2013)
@@ -403,12 +403,12 @@
test_conversion_from_integral_to_char<T>(wzero);
test_conversion_from_char_to_integral<T>(wzero);
#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(_LIBCPP_VERSION)
char16_t const u16zero = u'0';
test_conversion_from_integral_to_char<T>(u16zero);
test_conversion_from_char_to_integral<T>(u16zero);
#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(_LIBCPP_VERSION)
char32_t const u32zero = u'0';
test_conversion_from_integral_to_char<T>(u32zero);
test_conversion_from_char_to_integral<T>(u32zero);
Modified: branches/release/libs/conversion/test/lexical_cast_iterator_range_test.cpp
==============================================================================
--- branches/release/libs/conversion/test/lexical_cast_iterator_range_test.cpp (original)
+++ branches/release/libs/conversion/test/lexical_cast_iterator_range_test.cpp 2013-04-04 11:47:02 EDT (Thu, 04 Apr 2013)
@@ -27,6 +27,15 @@
#define BOOST_LCAST_NO_WCHAR_T
#endif
+
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(_LIBCPP_VERSION)
+#define BOOST_LC_RUNU16
+#endif
+
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(_LIBCPP_VERSION)
+#define BOOST_LC_RUNU32
+#endif
+
struct class_with_user_defined_sream_operators {
int i;
@@ -140,7 +149,7 @@
BOOST_CHECK(lexical_cast<std::wstring>(crng2) == L"1");
#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && defined(BOOST_STL_SUPPORTS_NEW_UNICODE_LOCALES)
+#if defined(BOOST_LC_RUNU16) && defined(BOOST_STL_SUPPORTS_NEW_UNICODE_LOCALES)
typedef std::basic_string<char16_t> my_char16_string;
BOOST_CHECK(lexical_cast<my_char16_string>(rng1) == u"1");
BOOST_CHECK(lexical_cast<my_char16_string>(crng1) == u"1");
@@ -148,7 +157,7 @@
BOOST_CHECK(lexical_cast<my_char16_string>(crng2) == u"1");
#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && defined(BOOST_STL_SUPPORTS_NEW_UNICODE_LOCALES)
+#if defined(BOOST_LC_RUNU32) && defined(BOOST_STL_SUPPORTS_NEW_UNICODE_LOCALES)
typedef std::basic_string<char32_t> my_char32_string;
BOOST_CHECK(lexical_cast<my_char32_string>(rng1) == U"1");
BOOST_CHECK(lexical_cast<my_char32_string>(crng1) == U"1");
@@ -200,7 +209,7 @@
void test_char16_iterator_ranges()
{
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#if defined(BOOST_LC_RUNU16)
typedef char16_t test_char_type;
test_char_type data1[] = u"1";
test_char_type data2[] = u"11";
@@ -212,7 +221,7 @@
void test_char32_iterator_ranges()
{
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+#if defined(BOOST_LC_RUNU32)
typedef char32_t test_char_type;
test_char_type data1[] = U"1";
test_char_type data2[] = U"11";
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