summaryrefslogtreecommitdiff
path: root/test/tgbot
diff options
context:
space:
mode:
authorOleg Morozenkov <reo7sp@users.noreply.github.com>2017-01-26 00:32:22 +0300
committerOleg Morozenkov <reo7sp@users.noreply.github.com>2017-01-26 00:32:22 +0300
commit85e0e991973594fb458410876a1cc09c5971b918 (patch)
tree08186c9e9f58cdb617b9b63d583f535b1c884b72 /test/tgbot
parent3549754e53f79e9ba0b00fb0bbded5d56a14ef51 (diff)
Helper method for loading files. Photo upload example. Fixes #24
Diffstat (limited to 'test/tgbot')
-rw-r--r--test/tgbot/tools/StringTools.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/tgbot/tools/StringTools.cpp b/test/tgbot/tools/StringTools.cpp
index 81e469a..969c3d8 100644
--- a/test/tgbot/tools/StringTools.cpp
+++ b/test/tgbot/tools/StringTools.cpp
@@ -36,22 +36,23 @@ BOOST_AUTO_TEST_SUITE(tStringTools)
BOOST_AUTO_TEST_CASE(startsWith) {
BOOST_CHECK(StringTools::startsWith("abc123", "abc"));
- BOOST_CHECK(!StringTools::startsWith("abc123", "aac"));
- BOOST_CHECK(!StringTools::startsWith("abc123", "Xabc"));
- BOOST_CHECK(!StringTools::startsWith("abc123", "abcX"));
+ 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("abc123", "113"));
- BOOST_CHECK(!StringTools::endsWith("abc123", "X123"));
- BOOST_CHECK(!StringTools::endsWith("abc123", "123X"));
+ 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) {
BOOST_CHECK(StringTools::split("123 456 789", ' ') == vector<string>({"123", "456", "789"}));
+ BOOST_CHECK(StringTools::split("aaa", ' ') == vector<string>({"aaa"}));
}
BOOST_AUTO_TEST_CASE(urlEncode) {