diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-08-19 19:50:14 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-08-19 19:50:14 (GMT) |
commit | fffffda255d80a56def292a9f7adf101382bee1a (patch) | |
tree | fe10f9559c04f57873ccd26e07157bcf9de6aa56 /Swiften/Base/UnitTest | |
parent | 72d22d91c99e2b1bd3c2abc712195111a434fcfc (diff) | |
download | swift-fffffda255d80a56def292a9f7adf101382bee1a.zip swift-fffffda255d80a56def292a9f7adf101382bee1a.tar.bz2 |
Added getExecutablePath().
Diffstat (limited to 'Swiften/Base/UnitTest')
-rw-r--r-- | Swiften/Base/UnitTest/StringTest.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Swiften/Base/UnitTest/StringTest.cpp b/Swiften/Base/UnitTest/StringTest.cpp index 32d04a6..eff7b80 100644 --- a/Swiften/Base/UnitTest/StringTest.cpp +++ b/Swiften/Base/UnitTest/StringTest.cpp @@ -34,11 +34,11 @@ class StringTest : public CppUnit::TestFixture CPPUNIT_TEST(testContains); CPPUNIT_TEST(testContainsFalse); CPPUNIT_TEST(testContainsExact); + CPPUNIT_TEST(testEndsWith); + CPPUNIT_TEST(testEndsWith_DoesNotEndWith); CPPUNIT_TEST_SUITE_END(); public: - StringTest() {} - void testGetLength() { String testling("xyz$xyz"); @@ -180,6 +180,14 @@ class StringTest : public CppUnit::TestFixture CPPUNIT_ASSERT(String("abcde").contains(String("abcde"))); } + void testEndsWith() { + CPPUNIT_ASSERT(String("abcdef").endsWith("cdef")); + } + + void testEndsWith_DoesNotEndWith() { + CPPUNIT_ASSERT(!String("abcdef").endsWith("ddef")); + } + }; CPPUNIT_TEST_SUITE_REGISTRATION(StringTest); |