|
Boost-Commit : |
From: bdawes_at_[hidden]
Date: 2007-11-04 10:32:04
Author: bemandawes
Date: 2007-11-04 10:32:03 EST (Sun, 04 Nov 2007)
New Revision: 40738
URL: http://svn.boost.org/trac/boost/changeset/40738
Log:
glibc++ may append unknown error value, so only test first part of string
Text files modified:
trunk/libs/system/test/error_code_test.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/libs/system/test/error_code_test.cpp
==============================================================================
--- trunk/libs/system/test/error_code_test.cpp (original)
+++ trunk/libs/system/test/error_code_test.cpp 2007-11-04 10:32:03 EST (Sun, 04 Nov 2007)
@@ -147,15 +147,15 @@
// test error_code and error_condition message(),
// see Boost.Filesystem operations_test for code specific message() tests
ec = error_code( -1, system_category );
- BOOST_CHECK( ec.message() == "Unknown error" );
+ BOOST_CHECK( ec.message().substr( 0, 13) == "Unknown error" );
ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category );
BOOST_CHECK( ec.message() != "" );
- BOOST_CHECK( ec.message() != "Unknown error" );
+ BOOST_CHECK( ec.message().substr( 0, 13) != "Unknown error" );
dec = error_condition( -1, posix_category );
- BOOST_CHECK( dec.message() == "Unknown error" );
+ BOOST_CHECK( dec.message().substr( 0, 13) == "Unknown error" );
dec = error_condition( BOOST_ACCESS_ERROR_MACRO, posix_category );
BOOST_CHECK( dec.message() != "" );
- BOOST_CHECK( dec.message() != "Unknown error" );
+ BOOST_CHECK( dec.message().substr( 0, 13) != "Unknown error" );
#ifdef BOOST_WINDOWS_API
std::cout << "Windows tests...\n";
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