From f32fb4b5e538be898323e8ba4f6dde683cf699e1 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 12 Dec 2011 18:09:53 +0000 Subject: [PATCH] Fixes #6186 test failures [SVN r75921] --- test/Jamfile.v2 | 2 +- test/lexical_cast_typedefed_wchar_test.cpp | 33 +++------------------- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e7408f3..96ce8f6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -35,6 +35,6 @@ test-suite conversion [ run lexical_cast_inf_nan_test.cpp ../../test/build//boost_unit_test_framework/static ] [ run lexical_cast_containers_test.cpp ../../test/build//boost_unit_test_framework/static ] [ run lexical_cast_empty_input_test.cpp ../../test/build//boost_unit_test_framework/static ] - [ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/static : : : msvc:on : : ] + [ compile lexical_cast_typedefed_wchar_test.cpp : msvc:on ] ; diff --git a/test/lexical_cast_typedefed_wchar_test.cpp b/test/lexical_cast_typedefed_wchar_test.cpp index ae84678..752c3e5 100755 --- a/test/lexical_cast_typedefed_wchar_test.cpp +++ b/test/lexical_cast_typedefed_wchar_test.cpp @@ -10,41 +10,16 @@ #include -#if defined(__INTEL_COMPILER) -#pragma warning(disable: 193 383 488 981 1418 1419) -#elif defined(BOOST_MSVC) -#pragma warning(disable: 4097 4100 4121 4127 4146 4244 4245 4511 4512 4701 4800) -#endif - +#include #include -#include -void test_typedefed_wchar_t(); - -using namespace boost; - -unit_test::test_suite *init_unit_test_suite(int, char *[]) -{ - unit_test::test_suite *suite = - BOOST_TEST_SUITE("lexical_cast unit test for typedefed wchar_t (mainly for MSVC)"); - suite->add(BOOST_TEST_CASE(&test_typedefed_wchar_t)); - - return suite; -} - - -void test_typedefed_wchar_t() +int main() { #ifdef BOOST_MSVC - BOOST_CHECK((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); #endif - BOOST_CHECK_EQUAL(lexical_cast(L"1000"), 1000); + return ::boost::lexical_cast(L"1000") == 1000; } - - - - -