Add comment to analyzed call
[dueringa_WikiWalker.git] / test / StringUtilsTest.cpp
blobca0ac41ed45abeb1c88b58785203f7512a89bf3e
1 #include <UnitTest++/UnitTest++.h>
3 #include "StringUtils.h"
5 SUITE(StringUtilsTest)
7 using namespace WikiWalker;
9 TEST(TestBeginString_Positives)
11 CHECK(StringUtils::startsWith("foo", "f"));
12 CHECK(StringUtils::startsWith("Buddy", "Bud"));
13 CHECK(StringUtils::startsWith("camelCase", "cam"));
16 TEST(TestBeginString_Equality)
18 CHECK(StringUtils::startsWith("foo", "foo"));
19 CHECK(StringUtils::startsWith("Buddy", "Buddy"));
20 CHECK(StringUtils::startsWith("camelCase", "camelCase"));
23 TEST(TestBeginString_SecondStringIsLonger)
25 CHECK(!StringUtils::startsWith("f", "foo"));
26 CHECK(!StringUtils::startsWith("Bu", "Bud"));
27 CHECK(!StringUtils::startsWith("cam", "camel"));
30 TEST(TestBeginString_EmptyString)
32 CHECK(!StringUtils::startsWith("foo", ""));
33 CHECK(!StringUtils::startsWith("", "foo"));
34 CHECK(!StringUtils::startsWith("", ""));