MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / TEST

Function TEST

test/common/string_test.cpp:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace lbug::common;
7
8TEST(StringTest, splitBySpace) {
9 std::string str = " a b c\td ";
10 std::vector<std::string> result = StringUtils::splitBySpace(str);
11 EXPECT_EQ(result.size(), 4);
12 EXPECT_EQ(result[0], "a");
13 EXPECT_EQ(result[1], "b");
14 EXPECT_EQ(result[2], "c");
15 EXPECT_EQ(result[3], "d");
16}
17
18TEST(StringTest, leftTrim) {
19 std::string str = " command ";

Callers

nothing calls this directly

Calls 4

ltrimFunction · 0.85
rtrimFunction · 0.85
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected