Skip to content

Commit 539c170

Browse files
author
Pavol Droba
committed
aditional tests added
[SVN r46497]
1 parent c81ee94 commit 539c170

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

string/test/predicate_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ void classification_test()
121121

122122
TEST_CLASS( !is_classified(std::ctype_base::space), "...", "..\n\r\t " );
123123
TEST_CLASS( ( !is_any_of("abc") && is_from_range('a','e') ) || is_space(), "d e", "abcde" );
124+
125+
// is_any_of test
126+
// TEST_CLASS( !is_any_of(""), "", "aaa" )
127+
TEST_CLASS( is_any_of("a"), "a", "ab" )
128+
TEST_CLASS( is_any_of("ba"), "ab", "abc" )
129+
TEST_CLASS( is_any_of("cba"), "abc", "abcd" )
130+
TEST_CLASS( is_any_of("hgfedcba"), "abcdefgh", "abcdefghi" )
131+
TEST_CLASS( is_any_of("qponmlkjihgfedcba"), "abcdefghijklmnopq", "zzz" )
124132
}
125133

126134
#undef TEST_CLASS

string/test/replace_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ void replace_all_test()
120120
{
121121
// replace all
122122
TEST_ALGO( replace_all, "1abc3abc2", string("abc") C_ string("YYY"), string("1YYY3YYY2") );
123+
TEST_ALGO( replace_all, string("1abc3abc2"), "/" C_ "\\", string("1abc3abc2") );
123124
TEST_ALGO( ireplace_all, "1aBc3AbC2", "abC" C_ "YYY", string("1YYY3YYY2") );
124125
TEST_ALGO( replace_all, "1abc3abc2", string("abc") C_ string("Z"), string("1Z3Z2") );
125126
TEST_ALGO( replace_all, "1abc3abc2", string("abc") C_ string("XXXX"), string("1XXXX3XXXX2") );

0 commit comments

Comments
 (0)