mirror of
https://github.com/boostorg/algorithm.git
synced 2025-06-30 06:21:08 +02:00
trim_all test fixed
[SVN r68173]
This commit is contained in:
@ -113,14 +113,14 @@ void trim_test()
|
|||||||
void trim_all_test()
|
void trim_all_test()
|
||||||
{
|
{
|
||||||
string str1(" 1x x x x1 ");
|
string str1(" 1x x x x1 ");
|
||||||
string str2(" 2x x x x2 ");
|
string str2("+---...2x+--x--+x-+-x2...---+");
|
||||||
string str3(" ");
|
string str3(" ");
|
||||||
|
|
||||||
// *** value passing tests *** //
|
// *** value passing tests *** //
|
||||||
|
|
||||||
// general string test
|
// general string test
|
||||||
BOOST_CHECK( trim_all_copy( str1 )=="1x x x x1" ) ;
|
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
|
// spaces-only string test
|
||||||
BOOST_CHECK( trim_all_copy( str3 )=="" );
|
BOOST_CHECK( trim_all_copy( str3 )=="" );
|
||||||
@ -131,8 +131,8 @@ void trim_all_test()
|
|||||||
// general string test
|
// general string test
|
||||||
trim_all( str1 );
|
trim_all( str1 );
|
||||||
BOOST_CHECK( str1=="1x x x x1" ) ;
|
BOOST_CHECK( str1=="1x x x x1" ) ;
|
||||||
trim_all( str2 );
|
trim_all_if( str2, is_punct() );
|
||||||
BOOST_CHECK( str2=="2x x x x2" ) ;
|
BOOST_CHECK( str2=="2x+x-x-x2" ) ;
|
||||||
|
|
||||||
// spaces-only string test
|
// spaces-only string test
|
||||||
str3 = " "; trim_all( str3 );
|
str3 = " "; trim_all( str3 );
|
||||||
|
Reference in New Issue
Block a user