|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68173 - trunk/libs/algorithm/string/test
From: droba_at_[hidden]
Date: 2011-01-15 13:38:02
Author: pavol_droba
Date: 2011-01-15 13:37:46 EST (Sat, 15 Jan 2011)
New Revision: 68173
URL: http://svn.boost.org/trac/boost/changeset/68173
Log:
trim_all test fixed
Text files modified:
trunk/libs/algorithm/string/test/trim_test.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/libs/algorithm/string/test/trim_test.cpp
==============================================================================
--- trunk/libs/algorithm/string/test/trim_test.cpp (original)
+++ trunk/libs/algorithm/string/test/trim_test.cpp 2011-01-15 13:37:46 EST (Sat, 15 Jan 2011)
@@ -113,14 +113,14 @@
void trim_all_test()
{
string str1(" 1x x x x1 ");
- string str2(" 2x x x x2 ");
+ string str2("+---...2x+--x--+x-+-x2...---+");
string str3(" ");
// *** value passing tests *** //
// general string test
BOOST_CHECK( trim_all_copy( str1 )=="1x x x x1" ) ;
- BOOST_CHECK( trim_all_copy( str2 )=="2x x x x2" ) ;
+ BOOST_CHECK( trim_all_copy_if( str2, is_punct() )=="2x+x-x-x2" ) ;
// spaces-only string test
BOOST_CHECK( trim_all_copy( str3 )=="" );
@@ -131,8 +131,8 @@
// general string test
trim_all( str1 );
BOOST_CHECK( str1=="1x x x x1" ) ;
- trim_all( str2 );
- BOOST_CHECK( str2=="2x x x x2" ) ;
+ trim_all_if( str2, is_punct() );
+ BOOST_CHECK( str2=="2x+x-x-x2" ) ;
// spaces-only string test
str3 = " "; trim_all( str3 );
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