aboutsummaryrefslogtreecommitdiff
path: root/test/common/str.h
diff options
context:
space:
mode:
authorMax Horn2007-04-15 18:27:10 +0000
committerMax Horn2007-04-15 18:27:10 +0000
commitaecd100f93cf0d475092acefe37bff8c5d55b881 (patch)
treebdf96fc808c4014c7369f32a3b72abe1c5c02e27 /test/common/str.h
parent35b19cdcc8499cf3b73e49a864eea976cc9525fe (diff)
downloadscummvm-rg350-aecd100f93cf0d475092acefe37bff8c5d55b881.tar.gz
scummvm-rg350-aecd100f93cf0d475092acefe37bff8c5d55b881.tar.bz2
scummvm-rg350-aecd100f93cf0d475092acefe37bff8c5d55b881.zip
Added Common::String::contains() method
svn-id: r26514
Diffstat (limited to 'test/common/str.h')
-rw-r--r--test/common/str.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/common/str.h b/test/common/str.h
index 8b7b966935..2691a5420d 100644
--- a/test/common/str.h
+++ b/test/common/str.h
@@ -109,6 +109,15 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS( str.hasSuffix("hahah"), false );
}
+ void test_contains( void )
+ {
+ Common::String str("this/is/a/test, haha");
+ TS_ASSERT_EQUALS( str.contains(""), true );
+ TS_ASSERT_EQUALS( str.contains("haha"), true );
+ TS_ASSERT_EQUALS( str.contains("hahb"), false );
+ TS_ASSERT_EQUALS( str.contains("test"), true );
+ }
+
void test_toLowercase( void )
{
Common::String str("Test it, NOW! 42");