Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75921 - trunk/libs/conversion/test
From: antoshkka_at_[hidden]
Date: 2011-12-12 13:09:54


Author: apolukhin
Date: 2011-12-12 13:09:53 EST (Mon, 12 Dec 2011)
New Revision: 75921
URL: http://svn.boost.org/trac/boost/changeset/75921

Log:
Fixes #6186 test failures
Text files modified:
   trunk/libs/conversion/test/Jamfile.v2 | 2 +-
   trunk/libs/conversion/test/lexical_cast_typedefed_wchar_test.cpp | 33 ++++-----------------------------
   2 files changed, 5 insertions(+), 30 deletions(-)

Modified: trunk/libs/conversion/test/Jamfile.v2
==============================================================================
--- trunk/libs/conversion/test/Jamfile.v2 (original)
+++ trunk/libs/conversion/test/Jamfile.v2 2011-12-12 13:09:53 EST (Mon, 12 Dec 2011)
@@ -35,6 +35,6 @@
     [ run lexical_cast_inf_nan_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
     [ run lexical_cast_containers_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
     [ run lexical_cast_empty_input_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
- [ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/<link>static : : : <toolset>msvc:<nowchar>on : : ]
+ [ compile lexical_cast_typedefed_wchar_test.cpp : <toolset>msvc:<nowchar>on ]
   ;
       

Modified: trunk/libs/conversion/test/lexical_cast_typedefed_wchar_test.cpp
==============================================================================
--- trunk/libs/conversion/test/lexical_cast_typedefed_wchar_test.cpp (original)
+++ trunk/libs/conversion/test/lexical_cast_typedefed_wchar_test.cpp 2011-12-12 13:09:53 EST (Mon, 12 Dec 2011)
@@ -10,41 +10,16 @@
 
 #include <boost/config.hpp>
 
-#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 <boost/static_assert.hpp>
 #include <boost/lexical_cast.hpp>
-#include <boost/test/unit_test.hpp>
-
-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<wchar_t, unsigned short>::value));
+ BOOST_STATIC_ASSERT((boost::is_same<wchar_t, unsigned short>::value));
 #endif
 
- BOOST_CHECK_EQUAL(lexical_cast<int>(L"1000"), 1000);
+ return ::boost::lexical_cast<int>(L"1000") == 1000;
 }
 
 
-
-
-
-
-


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