summaryrefslogtreecommitdiff
path: root/test/tgbot/tools/StringTools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/tgbot/tools/StringTools.cpp')
-rw-r--r--test/tgbot/tools/StringTools.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/tgbot/tools/StringTools.cpp b/test/tgbot/tools/StringTools.cpp
index 453919c..81e469a 100644
--- a/test/tgbot/tools/StringTools.cpp
+++ b/test/tgbot/tools/StringTools.cpp
@@ -36,12 +36,18 @@ BOOST_AUTO_TEST_SUITE(tStringTools)
BOOST_AUTO_TEST_CASE(startsWith) {
BOOST_CHECK(StringTools::startsWith("abc123", "abc"));
- BOOST_CHECK(StringTools::startsWith("abc", "abc123"));
+ BOOST_CHECK(!StringTools::startsWith("abc123", "aac"));
+ BOOST_CHECK(!StringTools::startsWith("abc123", "Xabc"));
+ BOOST_CHECK(!StringTools::startsWith("abc123", "abcX"));
+ BOOST_CHECK(!StringTools::startsWith("abc", "abc123"));
}
BOOST_AUTO_TEST_CASE(endsWith) {
BOOST_CHECK(StringTools::endsWith("abc123", "123"));
- BOOST_CHECK(StringTools::endsWith("123", "abc123"));
+ BOOST_CHECK(!StringTools::endsWith("abc123", "113"));
+ BOOST_CHECK(!StringTools::endsWith("abc123", "X123"));
+ BOOST_CHECK(!StringTools::endsWith("abc123", "123X"));
+ BOOST_CHECK(!StringTools::endsWith("123", "abc123"));
}
BOOST_AUTO_TEST_CASE(split) {