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

Function TEST

src/colmap/util/string_test.cc:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46TEST(StringPrintf, Nominal) {
47 EXPECT_EQ(StringPrintf("%s", "test"), "test");
48 EXPECT_EQ(StringPrintf("%d", 1), "1");
49 EXPECT_EQ(StringPrintf("%.3f", 1.234), "1.234");
50 EXPECT_EQ(StringPrintf("test%s", "test"), "testtest");
51 EXPECT_EQ(StringPrintf("test%d", 1), "test1");
52 EXPECT_EQ(StringPrintf("test%.3f", 1.234), "test1.234");
53 EXPECT_EQ(StringPrintf("%s%s", "test", "test"), "testtest");
54 EXPECT_EQ(StringPrintf("%d%s", 1, "test"), "1test");
55 EXPECT_EQ(StringPrintf("%.3f%s", 1.234, "test"), "1.234test");
56}
57
58TEST(StringReplace, Nominal) {
59 EXPECT_EQ(StringReplace("test", "-", ""), "test");

Callers

nothing calls this directly

Calls 12

StringPrintfFunction · 0.85
StringReplaceFunction · 0.85
StringGetAfterFunction · 0.85
StringSplitFunction · 0.85
StringStartsWithFunction · 0.85
StringContainsFunction · 0.85
UTF8ToCodePageWinFunction · 0.85
CodePageToUTF8WinFunction · 0.85
UTF8ToPlatformFunction · 0.85
PlatformToUTF8Function · 0.85
StringToDoubleFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected