aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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");