summaryrefslogtreecommitdiff
path: root/test/tgbot/tools
diff options
context:
space:
mode:
authorOleg Morozenkov <reo7sp@users.noreply.github.com>2017-01-15 02:01:22 +0300
committerOleg Morozenkov <reo7sp@users.noreply.github.com>2017-01-15 02:01:22 +0300
commitad676623168e7b7b083f66617087c6cf424000d1 (patch)
tree64a893a0c17e2a29c227ebdb53076e40ace19af0 /test/tgbot/tools
parentbbf030e1d315d6ba108a75a5ce0113485a2319ba (diff)
Fix tests
Diffstat (limited to 'test/tgbot/tools')
-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) {