Lines Matching refs:s
25 StringPiece s(nullptr); in TEST() local
26 EXPECT_EQ(nullptr, s.data()); in TEST()
27 EXPECT_EQ(0u, s.size()); in TEST()
28 EXPECT_TRUE(s.empty()); in TEST()
31 StringPiece s(""); in TEST() local
32 EXPECT_NE(nullptr, s.data()); in TEST()
33 EXPECT_EQ(0u, s.size()); in TEST()
34 EXPECT_TRUE(s.empty()); in TEST()
37 StringPiece s("", 0); in TEST() local
38 EXPECT_NE(nullptr, s.data()); in TEST()
39 EXPECT_EQ(0u, s.size()); in TEST()
40 EXPECT_TRUE(s.empty()); in TEST()
43 StringPiece s("abcde"); in TEST() local
44 EXPECT_NE(nullptr, s.data()); in TEST()
45 EXPECT_EQ(5u, s.size()); in TEST()
46 EXPECT_FALSE(s.empty()); in TEST()
47 EXPECT_EQ("abcde", s); in TEST()
48 EXPECT_NE("abc", s); in TEST()
51 StringPiece s("abcde", 5); in TEST() local
52 EXPECT_NE(nullptr, s.data()); in TEST()
53 EXPECT_EQ(5u, s.size()); in TEST()
54 EXPECT_FALSE(s.empty()); in TEST()
55 EXPECT_EQ("abcde", s); in TEST()
56 EXPECT_NE("abc", s); in TEST()
59 StringPiece s("abcde", 3); in TEST() local
60 EXPECT_NE(nullptr, s.data()); in TEST()
61 EXPECT_EQ(3u, s.size()); in TEST()
62 EXPECT_FALSE(s.empty()); in TEST()
63 EXPECT_EQ("abc", s); in TEST()
64 EXPECT_NE("abcde", s); in TEST()
68 StringPiece s(kText + 2, 3); in TEST() local
69 EXPECT_NE(nullptr, s.data()); in TEST()
70 EXPECT_EQ(3u, s.size()); in TEST()
71 EXPECT_FALSE(s.empty()); in TEST()
72 EXPECT_EQ("cde", s); in TEST()
73 EXPECT_NE("abcde", s); in TEST()
77 StringPiece s(kText + 2); in TEST() local
78 EXPECT_NE(nullptr, s.data()); in TEST()
79 EXPECT_EQ(3u, s.size()); in TEST()
80 EXPECT_FALSE(s.empty()); in TEST()
81 EXPECT_EQ("cde", s); in TEST()
82 EXPECT_NE("abcde", s); in TEST()
87 StringPiece s("abcde"); in TEST() local
88 EXPECT_EQ("", s.substr(0, 0)); in TEST()
89 EXPECT_EQ("a", s.substr(0, 1)); in TEST()
90 EXPECT_EQ("abc", s.substr(0, 3)); in TEST()
91 EXPECT_EQ("cde", s.substr(2, 3)); in TEST()
92 EXPECT_EQ("", s.substr(2, 0)); in TEST()
93 EXPECT_EQ("", s.substr(5, 0)); in TEST()
97 StringPiece s("mississippi"); in TEST() local
98 EXPECT_EQ(1u, s.find(0, 'i')); in TEST()
99 EXPECT_EQ(1u, s.find(1, 'i')); in TEST()
100 EXPECT_EQ(4u, s.find(2, 'i')); in TEST()
101 EXPECT_EQ(4u, s.find(3, 'i')); in TEST()
102 EXPECT_EQ(4u, s.find(4, 'i')); in TEST()
103 EXPECT_EQ(7u, s.find(5, 'i')); in TEST()
104 EXPECT_EQ(7u, s.find(6, 'i')); in TEST()
105 EXPECT_EQ(7u, s.find(7, 'i')); in TEST()
106 EXPECT_EQ(10u, s.find(8, 'i')); in TEST()
107 EXPECT_EQ(10u, s.find(9, 'i')); in TEST()
108 EXPECT_EQ(10u, s.find(10, 'i')); in TEST()
109 EXPECT_EQ(11u, s.find(11, 'i')); in TEST()
111 EXPECT_EQ(11u, s.find(12, 'i')); // search index is out of bounds. in TEST()
115 StringPiece s(""); in TEST() local
116 EXPECT_EQ(0u, s.find(0, 'a')); in TEST()
121 StringPiece s(""); in TEST() local
122 SplitIterator it(s, ','); in TEST()
126 StringPiece s("abcde"); in TEST() local
127 SplitIterator it(s, ','); in TEST()
133 StringPiece s("a,bb,ccc,dddd,eeeee"); in TEST() local
134 SplitIterator it(s, ','); in TEST()
148 StringPiece s(",,,,"); in TEST() local
149 SplitIterator it(s, ','); in TEST()
163 StringPiece s(",a,,b,"); in TEST() local
164 SplitIterator it(s, ','); in TEST()