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

Function TEST

base/string/string_piece_test.cpp:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11char g_s2[] = "http://finance.qq.com/a/20101228/http://finance.qq.com/a/20101228/006336.htm";
12
13TEST(Test, Correction)
14{
15 StringPiece s1(g_s1, sizeof(g_s1) - 1);
16 StringPiece s2(g_s2, sizeof(g_s2) - 1);
17
18 StringPiece sp1(g_s1, sizeof(g_s1) - 1);
19 StringPiece sp2(g_s2, sizeof(g_s2) - 1);
20
21 EXPECT_EQ(s1 == s2, sp1 == sp2);
22 EXPECT_EQ(s1 != s2, sp1 != sp2);
23 EXPECT_EQ(s1 < s2, sp1 < sp2);
24 EXPECT_EQ(s1 <= s2, sp1 <= sp2);
25 EXPECT_EQ(s1 > s2, sp1 > sp2);
26 EXPECT_EQ(s1 >= s2, sp1 >= sp2);
27}
28
29TEST(StringPiece, memcmp_Performance)
30{

Callers

nothing calls this directly

Calls 15

StringPieceClass · 0.85
dataMethod · 0.80
max_sizeMethod · 0.80
capacityMethod · 0.80
copyMethod · 0.80
findMethod · 0.80
rfindMethod · 0.80
as_stringMethod · 0.80
find_first_not_ofMethod · 0.80
find_last_not_ofMethod · 0.80
substrMethod · 0.80
copy_to_stringMethod · 0.80

Tested by

no test coverage detected