MCPcopy Create free account
hub / github.com/chen3feng/toft / TEST

Function TEST

base/string/concat_test.cpp:32–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30} // namespace
31
32TEST(StringConcat, Enum)
33{
34 // local enum
35 enum {
36 L_FIRST,
37 L_SECOND
38 };
39
40 std::string s;
41 StringAppend(&s, N_FIRST);
42 EXPECT_EQ("0", s);
43 StringAppend(&s, A_FIRST);
44 EXPECT_EQ("00", s);
45 StringAppend(&s, L_FIRST);
46 EXPECT_EQ("000", s);
47 EXPECT_EQ("0", StringConcat(N_FIRST));
48
49 // The following code can't compile because anonymous and local enums
50 // has no linkage
51#if 0
52 EXPECT_EQ("0", StringConcat(A_FIRST));
53 EXPECT_EQ("0", StringConcat(L_FIRST));
54#endif
55}
56
57TEST(StringConcat, Append)
58{

Callers

nothing calls this directly

Calls 3

StringConcatFunction · 0.85
StringConcatToFunction · 0.85
StringAppendFunction · 0.70

Tested by

no test coverage detected