Lines Matching refs:ASSERT_EQ
107 ASSERT_EQ(a[6], 'g');
108 ASSERT_EQ(b[0], 'a');
109 ASSERT_EQ(c[2], 'z');
110 ASSERT_EQ(f[3], '\0');
111 ASSERT_EQ(f[5], '5');
113 ASSERT_EQ(*d.data(), 'f');
114 ASSERT_EQ(d.data()[5], 'r');
117 ASSERT_EQ(*a.begin(), 'a');
118 ASSERT_EQ(*(b.begin() + 2), 'c');
119 ASSERT_EQ(*(c.end() - 1), 'z');
121 ASSERT_EQ(*a.rbegin(), 'z');
122 ASSERT_EQ(*(b.rbegin() + 2), 'a');
123 ASSERT_EQ(*(c.rend() - 1), 'x');
126 ASSERT_EQ(a.size(), 26U);
127 ASSERT_EQ(b.size(), 3U);
128 ASSERT_EQ(c.size(), 3U);
129 ASSERT_EQ(d.size(), 6U);
130 ASSERT_EQ(e.size(), 0U);
131 ASSERT_EQ(f.size(), 7U);
141 ASSERT_EQ(d.size(), 0U);
150 ASSERT_EQ(a.copy(buf, 4), 4U);
151 ASSERT_EQ(buf[0], a[0]);
152 ASSERT_EQ(buf[1], a[1]);
153 ASSERT_EQ(buf[2], a[2]);
154 ASSERT_EQ(buf[3], a[3]);
155 ASSERT_EQ(a.copy(buf, 3, 7), 3U);
156 ASSERT_EQ(buf[0], a[7]);
157 ASSERT_EQ(buf[1], a[8]);
158 ASSERT_EQ(buf[2], a[9]);
159 ASSERT_EQ(buf[3], a[3]);
160 ASSERT_EQ(c.copy(buf, 99), 3U);
161 ASSERT_EQ(buf[0], c[0]);
162 ASSERT_EQ(buf[1], c[1]);
163 ASSERT_EQ(buf[2], c[2]);
164 ASSERT_EQ(buf[3], a[3]);
166 ASSERT_EQ(StringPiece::npos, std::string::npos);
168 ASSERT_EQ(a.find(b), 0U);
169 ASSERT_EQ(a.find(b, 1), StringPiece::npos);
170 ASSERT_EQ(a.find(c), 23U);
171 ASSERT_EQ(a.find(c, 9), 23U);
172 ASSERT_EQ(a.find(c, StringPiece::npos), StringPiece::npos);
173 ASSERT_EQ(b.find(c), StringPiece::npos);
174 ASSERT_EQ(b.find(c, StringPiece::npos), StringPiece::npos);
175 ASSERT_EQ(a.find(d), 0U);
176 ASSERT_EQ(a.find(e), 0U);
177 ASSERT_EQ(a.find(d, 12), 12U);
178 ASSERT_EQ(a.find(e, 17), 17U);
180 ASSERT_EQ(a.find(g), StringPiece::npos);
182 ASSERT_EQ(d.find(b), StringPiece::npos);
183 ASSERT_EQ(e.find(b), StringPiece::npos);
184 ASSERT_EQ(d.find(b, 4), StringPiece::npos);
185 ASSERT_EQ(e.find(b, 7), StringPiece::npos);
188 ASSERT_EQ(d.find(d), empty_search_pos);
189 ASSERT_EQ(d.find(e), empty_search_pos);
190 ASSERT_EQ(e.find(d), empty_search_pos);
191 ASSERT_EQ(e.find(e), empty_search_pos);
192 ASSERT_EQ(d.find(d, 4), std::string().find(std::string(), 4));
193 ASSERT_EQ(d.find(e, 4), std::string().find(std::string(), 4));
194 ASSERT_EQ(e.find(d, 4), std::string().find(std::string(), 4));
195 ASSERT_EQ(e.find(e, 4), std::string().find(std::string(), 4));
197 ASSERT_EQ(a.find('a'), 0U);
198 ASSERT_EQ(a.find('c'), 2U);
199 ASSERT_EQ(a.find('z'), 25U);
200 ASSERT_EQ(a.find('$'), StringPiece::npos);
201 ASSERT_EQ(a.find('\0'), StringPiece::npos);
202 ASSERT_EQ(f.find('\0'), 3U);
203 ASSERT_EQ(f.find('3'), 2U);
204 ASSERT_EQ(f.find('5'), 5U);
205 ASSERT_EQ(g.find('o'), 4U);
206 ASSERT_EQ(g.find('o', 4), 4U);
207 ASSERT_EQ(g.find('o', 5), 8U);
208 ASSERT_EQ(a.find('b', 5), StringPiece::npos);
210 ASSERT_EQ(d.find('\0'), StringPiece::npos);
211 ASSERT_EQ(e.find('\0'), StringPiece::npos);
212 ASSERT_EQ(d.find('\0', 4), StringPiece::npos);
213 ASSERT_EQ(e.find('\0', 7), StringPiece::npos);
214 ASSERT_EQ(d.find('x'), StringPiece::npos);
215 ASSERT_EQ(e.find('x'), StringPiece::npos);
216 ASSERT_EQ(d.find('x', 4), StringPiece::npos);
217 ASSERT_EQ(e.find('x', 7), StringPiece::npos);
219 ASSERT_EQ(a.rfind(b), 0U);
220 ASSERT_EQ(a.rfind(b, 1), 0U);
221 ASSERT_EQ(a.rfind(c), 23U);
222 ASSERT_EQ(a.rfind(c, 22U), StringPiece::npos);
223 ASSERT_EQ(a.rfind(c, 1U), StringPiece::npos);
224 ASSERT_EQ(a.rfind(c, 0U), StringPiece::npos);
225 ASSERT_EQ(b.rfind(c), StringPiece::npos);
226 ASSERT_EQ(b.rfind(c, 0U), StringPiece::npos);
227 ASSERT_EQ(a.rfind(d), (size_t) a.as_string().rfind(std::string()));
228 ASSERT_EQ(a.rfind(e), a.as_string().rfind(std::string()));
229 ASSERT_EQ(a.rfind(d, 12), 12U);
230 ASSERT_EQ(a.rfind(e, 17), 17U);
231 ASSERT_EQ(a.rfind(g), StringPiece::npos);
232 ASSERT_EQ(d.rfind(b), StringPiece::npos);
233 ASSERT_EQ(e.rfind(b), StringPiece::npos);
234 ASSERT_EQ(d.rfind(b, 4), StringPiece::npos);
235 ASSERT_EQ(e.rfind(b, 7), StringPiece::npos);
237 ASSERT_EQ(d.rfind(d, 4), std::string().rfind(std::string()));
238 ASSERT_EQ(e.rfind(d, 7), std::string().rfind(std::string()));
239 ASSERT_EQ(d.rfind(e, 4), std::string().rfind(std::string()));
240 ASSERT_EQ(e.rfind(e, 7), std::string().rfind(std::string()));
241 ASSERT_EQ(d.rfind(d), std::string().rfind(std::string()));
242 ASSERT_EQ(e.rfind(d), std::string().rfind(std::string()));
243 ASSERT_EQ(d.rfind(e), std::string().rfind(std::string()));
244 ASSERT_EQ(e.rfind(e), std::string().rfind(std::string()));
246 ASSERT_EQ(g.rfind('o'), 8U);
247 ASSERT_EQ(g.rfind('q'), StringPiece::npos);
248 ASSERT_EQ(g.rfind('o', 8), 8U);
249 ASSERT_EQ(g.rfind('o', 7), 4U);
250 ASSERT_EQ(g.rfind('o', 3), StringPiece::npos);
251 ASSERT_EQ(f.rfind('\0'), 3U);
252 ASSERT_EQ(f.rfind('\0', 12), 3U);
253 ASSERT_EQ(f.rfind('3'), 2U);
254 ASSERT_EQ(f.rfind('5'), 5U);
256 ASSERT_EQ(d.rfind('o'), StringPiece::npos);
257 ASSERT_EQ(e.rfind('o'), StringPiece::npos);
258 ASSERT_EQ(d.rfind('o', 4), StringPiece::npos);
259 ASSERT_EQ(e.rfind('o', 7), StringPiece::npos);
261 ASSERT_EQ(a.find_first_of(b), 0U);
262 ASSERT_EQ(a.find_first_of(b, 0), 0U);
263 ASSERT_EQ(a.find_first_of(b, 1), 1U);
264 ASSERT_EQ(a.find_first_of(b, 2), 2U);
265 ASSERT_EQ(a.find_first_of(b, 3), StringPiece::npos);
266 ASSERT_EQ(a.find_first_of(c), 23U);
267 ASSERT_EQ(a.find_first_of(c, 23), 23U);
268 ASSERT_EQ(a.find_first_of(c, 24), 24U);
269 ASSERT_EQ(a.find_first_of(c, 25), 25U);
270 ASSERT_EQ(a.find_first_of(c, 26), StringPiece::npos);
271 ASSERT_EQ(g.find_first_of(b), 13U);
272 ASSERT_EQ(g.find_first_of(c), 0U);
273 ASSERT_EQ(a.find_first_of(f), StringPiece::npos);
274 ASSERT_EQ(f.find_first_of(a), StringPiece::npos);
276 ASSERT_EQ(a.find_first_of(d), StringPiece::npos);
277 ASSERT_EQ(a.find_first_of(e), StringPiece::npos);
278 ASSERT_EQ(d.find_first_of(b), StringPiece::npos);
279 ASSERT_EQ(e.find_first_of(b), StringPiece::npos);
280 ASSERT_EQ(d.find_first_of(d), StringPiece::npos);
281 ASSERT_EQ(e.find_first_of(d), StringPiece::npos);
282 ASSERT_EQ(d.find_first_of(e), StringPiece::npos);
283 ASSERT_EQ(e.find_first_of(e), StringPiece::npos);
285 ASSERT_EQ(a.find_first_not_of(b), 3U);
286 ASSERT_EQ(a.find_first_not_of(c), 0U);
287 ASSERT_EQ(b.find_first_not_of(a), StringPiece::npos);
288 ASSERT_EQ(c.find_first_not_of(a), StringPiece::npos);
289 ASSERT_EQ(f.find_first_not_of(a), 0U);
290 ASSERT_EQ(a.find_first_not_of(f), 0U);
291 ASSERT_EQ(a.find_first_not_of(d), 0U);
292 ASSERT_EQ(a.find_first_not_of(e), 0U);
294 ASSERT_EQ(d.find_first_not_of(a), StringPiece::npos);
295 ASSERT_EQ(e.find_first_not_of(a), StringPiece::npos);
296 ASSERT_EQ(d.find_first_not_of(d), StringPiece::npos);
297 ASSERT_EQ(e.find_first_not_of(d), StringPiece::npos);
298 ASSERT_EQ(d.find_first_not_of(e), StringPiece::npos);
299 ASSERT_EQ(e.find_first_not_of(e), StringPiece::npos);
302 ASSERT_EQ(h.find_first_not_of('='), StringPiece::npos);
303 ASSERT_EQ(h.find_first_not_of('=', 3), StringPiece::npos);
304 ASSERT_EQ(h.find_first_not_of('\0'), 0U);
305 ASSERT_EQ(g.find_first_not_of('x'), 2U);
306 ASSERT_EQ(f.find_first_not_of('\0'), 0U);
307 ASSERT_EQ(f.find_first_not_of('\0', 3), 4U);
308 ASSERT_EQ(f.find_first_not_of('\0', 2), 2U);
310 ASSERT_EQ(d.find_first_not_of('x'), StringPiece::npos);
311 ASSERT_EQ(e.find_first_not_of('x'), StringPiece::npos);
312 ASSERT_EQ(d.find_first_not_of('\0'), StringPiece::npos);
313 ASSERT_EQ(e.find_first_not_of('\0'), StringPiece::npos);
317 ASSERT_EQ(h.find_last_of(a), StringPiece::npos);
318 ASSERT_EQ(g.find_last_of(a), g.size()-1);
319 ASSERT_EQ(a.find_last_of(b), 2U);
320 ASSERT_EQ(a.find_last_of(c), a.size()-1);
321 ASSERT_EQ(f.find_last_of(i), 6U);
322 ASSERT_EQ(a.find_last_of('a'), 0U);
323 ASSERT_EQ(a.find_last_of('b'), 1U);
324 ASSERT_EQ(a.find_last_of('z'), 25U);
325 ASSERT_EQ(a.find_last_of('a', 5), 0U);
326 ASSERT_EQ(a.find_last_of('b', 5), 1U);
327 ASSERT_EQ(a.find_last_of('b', 0), StringPiece::npos);
328 ASSERT_EQ(a.find_last_of('z', 25), 25U);
329 ASSERT_EQ(a.find_last_of('z', 24), StringPiece::npos);
330 ASSERT_EQ(f.find_last_of(i, 5), 5U);
331 ASSERT_EQ(f.find_last_of(i, 6), 6U);
332 ASSERT_EQ(f.find_last_of(a, 4), StringPiece::npos);
334 ASSERT_EQ(f.find_last_of(d), StringPiece::npos);
335 ASSERT_EQ(f.find_last_of(e), StringPiece::npos);
336 ASSERT_EQ(f.find_last_of(d, 4), StringPiece::npos);
337 ASSERT_EQ(f.find_last_of(e, 4), StringPiece::npos);
338 ASSERT_EQ(d.find_last_of(d), StringPiece::npos);
339 ASSERT_EQ(d.find_last_of(e), StringPiece::npos);
340 ASSERT_EQ(e.find_last_of(d), StringPiece::npos);
341 ASSERT_EQ(e.find_last_of(e), StringPiece::npos);
342 ASSERT_EQ(d.find_last_of(f), StringPiece::npos);
343 ASSERT_EQ(e.find_last_of(f), StringPiece::npos);
344 ASSERT_EQ(d.find_last_of(d, 4), StringPiece::npos);
345 ASSERT_EQ(d.find_last_of(e, 4), StringPiece::npos);
346 ASSERT_EQ(e.find_last_of(d, 4), StringPiece::npos);
347 ASSERT_EQ(e.find_last_of(e, 4), StringPiece::npos);
348 ASSERT_EQ(d.find_last_of(f, 4), StringPiece::npos);
349 ASSERT_EQ(e.find_last_of(f, 4), StringPiece::npos);
351 ASSERT_EQ(a.find_last_not_of(b), a.size()-1);
352 ASSERT_EQ(a.find_last_not_of(c), 22U);
353 ASSERT_EQ(b.find_last_not_of(a), StringPiece::npos);
354 ASSERT_EQ(b.find_last_not_of(b), StringPiece::npos);
355 ASSERT_EQ(f.find_last_not_of(i), 4U);
356 ASSERT_EQ(a.find_last_not_of(c, 24), 22U);
357 ASSERT_EQ(a.find_last_not_of(b, 3), 3U);
358 ASSERT_EQ(a.find_last_not_of(b, 2), StringPiece::npos);
360 ASSERT_EQ(f.find_last_not_of(d), f.size()-1);
361 ASSERT_EQ(f.find_last_not_of(e), f.size()-1);
362 ASSERT_EQ(f.find_last_not_of(d, 4), 4U);
363 ASSERT_EQ(f.find_last_not_of(e, 4), 4U);
364 ASSERT_EQ(d.find_last_not_of(d), StringPiece::npos);
365 ASSERT_EQ(d.find_last_not_of(e), StringPiece::npos);
366 ASSERT_EQ(e.find_last_not_of(d), StringPiece::npos);
367 ASSERT_EQ(e.find_last_not_of(e), StringPiece::npos);
368 ASSERT_EQ(d.find_last_not_of(f), StringPiece::npos);
369 ASSERT_EQ(e.find_last_not_of(f), StringPiece::npos);
370 ASSERT_EQ(d.find_last_not_of(d, 4), StringPiece::npos);
371 ASSERT_EQ(d.find_last_not_of(e, 4), StringPiece::npos);
372 ASSERT_EQ(e.find_last_not_of(d, 4), StringPiece::npos);
373 ASSERT_EQ(e.find_last_not_of(e, 4), StringPiece::npos);
374 ASSERT_EQ(d.find_last_not_of(f, 4), StringPiece::npos);
375 ASSERT_EQ(e.find_last_not_of(f, 4), StringPiece::npos);
377 ASSERT_EQ(h.find_last_not_of('x'), h.size() - 1);
378 ASSERT_EQ(h.find_last_not_of('='), StringPiece::npos);
379 ASSERT_EQ(b.find_last_not_of('c'), 1U);
380 ASSERT_EQ(h.find_last_not_of('x', 2), 2U);
381 ASSERT_EQ(h.find_last_not_of('=', 2), StringPiece::npos);
382 ASSERT_EQ(b.find_last_not_of('b', 1), 0U);
384 ASSERT_EQ(d.find_last_not_of('x'), StringPiece::npos);
385 ASSERT_EQ(e.find_last_not_of('x'), StringPiece::npos);
386 ASSERT_EQ(d.find_last_not_of('\0'), StringPiece::npos);
387 ASSERT_EQ(e.find_last_not_of('\0'), StringPiece::npos);
389 ASSERT_EQ(a.substr(0, 3), b);
390 ASSERT_EQ(a.substr(23), c);
391 ASSERT_EQ(a.substr(23, 3), c);
392 ASSERT_EQ(a.substr(23, 99), c);
393 ASSERT_EQ(a.substr(0), a);
394 ASSERT_EQ(a.substr(3, 2), "de");
396 ASSERT_EQ(a.substr(99, 2), e);
397 ASSERT_EQ(d.substr(99), e);
398 ASSERT_EQ(d.substr(0, 99), e);
399 ASSERT_EQ(d.substr(99, 99), e);
413 ASSERT_EQ(s2.size(), 6U);
414 ASSERT_EQ(s2, "foobar");
416 ASSERT_EQ(s2.size(), 7U);
417 ASSERT_EQ(s1, s2);
424 ASSERT_EQ(s2.size(), 6U);
425 ASSERT_EQ(s2, "foobar");
427 ASSERT_EQ(s2.size(), 12U);
428 ASSERT_EQ(s2, "foobarfoobar");
457 ASSERT_EQ(c, "bar");
460 ASSERT_EQ(c, a);
462 ASSERT_EQ(c, e);
467 ASSERT_EQ(c, "foo");
470 ASSERT_EQ(c, a);
472 ASSERT_EQ(c, e);
476 ASSERT_EQ(c, a);
478 ASSERT_EQ(c, e);
483 ASSERT_EQ(c, a);
486 ASSERT_EQ(c, a);
488 ASSERT_EQ(c, e);
494 ASSERT_EQ(c, s3);
502 ASSERT_EQ(s.data(), (const char*)NULL);
503 ASSERT_EQ(s.size(), 0U);
506 ASSERT_EQ(s.data(), (const char*)NULL);
507 ASSERT_EQ(s.size(), 0U);