From ad676623168e7b7b083f66617087c6cf424000d1 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Sun, 15 Jan 2017 02:01:22 +0300 Subject: Fix tests --- test/tgbot/tools/StringTools.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/tgbot/tools') 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) { -- cgit v1.2.3