Boost logo

Boost-Commit :

From: droba_at_[hidden]
Date: 2008-06-18 17:55:39


Author: pavol_droba
Date: 2008-06-18 17:55:38 EDT (Wed, 18 Jun 2008)
New Revision: 46497
URL: http://svn.boost.org/trac/boost/changeset/46497

Log:
aditional tests added

Text files modified:
   trunk/libs/algorithm/string/test/predicate_test.cpp | 8 ++++++++
   trunk/libs/algorithm/string/test/replace_test.cpp | 1 +
   2 files changed, 9 insertions(+), 0 deletions(-)

Modified: trunk/libs/algorithm/string/test/predicate_test.cpp
==============================================================================
--- trunk/libs/algorithm/string/test/predicate_test.cpp (original)
+++ trunk/libs/algorithm/string/test/predicate_test.cpp 2008-06-18 17:55:38 EDT (Wed, 18 Jun 2008)
@@ -121,6 +121,14 @@
 
     TEST_CLASS( !is_classified(std::ctype_base::space), "...", "..\n\r\t " );
     TEST_CLASS( ( !is_any_of("abc") && is_from_range('a','e') ) || is_space(), "d e", "abcde" );
+
+ // is_any_of test
+// TEST_CLASS( !is_any_of(""), "", "aaa" )
+ TEST_CLASS( is_any_of("a"), "a", "ab" )
+ TEST_CLASS( is_any_of("ba"), "ab", "abc" )
+ TEST_CLASS( is_any_of("cba"), "abc", "abcd" )
+ TEST_CLASS( is_any_of("hgfedcba"), "abcdefgh", "abcdefghi" )
+ TEST_CLASS( is_any_of("qponmlkjihgfedcba"), "abcdefghijklmnopq", "zzz" )
 }
 
 #undef TEST_CLASS

Modified: trunk/libs/algorithm/string/test/replace_test.cpp
==============================================================================
--- trunk/libs/algorithm/string/test/replace_test.cpp (original)
+++ trunk/libs/algorithm/string/test/replace_test.cpp 2008-06-18 17:55:38 EDT (Wed, 18 Jun 2008)
@@ -120,6 +120,7 @@
 {
     // replace all
     TEST_ALGO( replace_all, "1abc3abc2", string("abc") C_ string("YYY"), string("1YYY3YYY2") );
+ TEST_ALGO( replace_all, string("1abc3abc2"), "/" C_ "\\", string("1abc3abc2") );
     TEST_ALGO( ireplace_all, "1aBc3AbC2", "abC" C_ "YYY", string("1YYY3YYY2") );
     TEST_ALGO( replace_all, "1abc3abc2", string("abc") C_ string("Z"), string("1Z3Z2") );
     TEST_ALGO( replace_all, "1abc3abc2", string("abc") C_ string("XXXX"), string("1XXXX3XXXX2") );


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