From 85e0e991973594fb458410876a1cc09c5971b918 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Thu, 26 Jan 2017 00:32:22 +0300 Subject: Helper method for loading files. Photo upload example. Fixes #24 --- test/tgbot/tools/StringTools.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/tgbot') 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({"123", "456", "789"})); + BOOST_CHECK(StringTools::split("aaa", ' ') == vector({"aaa"})); } BOOST_AUTO_TEST_CASE(urlEncode) { -- cgit v1.2.3