MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / TEST

Function TEST

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

Source from the content-addressed store, hash-verified

6using namespace Star;
7
8TEST(StringTest, substr) {
9 EXPECT_EQ(String("barbazbaffoo").substr(4, 4), String("azba"));
10 EXPECT_EQ(String("\0asdf", 5).substr(1, 2), String("as"));
11}
12
13TEST(StringTest, find) {
14 EXPECT_EQ(String("xxFooxx").find("Foo"), 2u);

Callers

nothing calls this directly

Calls 15

StringClass · 0.85
StringListClass · 0.85
strfFunction · 0.85
utf8LengthFunction · 0.85
stringFunction · 0.85
splitAnyMethod · 0.80
rsplitAnyMethod · 0.80
rextractMethod · 0.80
toLowerMethod · 0.80
toUpperMethod · 0.80

Tested by

no test coverage detected