Lines Matching defs:Piece
198 typedef BasicStringPiece<TypeParam> Piece;
211 Piece e;
215 Piece f(temp);
234 ASSERT_EQ(Piece::npos, TypeParam::npos);
237 ASSERT_EQ(a.find(b, 1), Piece::npos);
240 ASSERT_EQ(a.find(c, Piece::npos), Piece::npos);
241 ASSERT_EQ(b.find(c), Piece::npos);
242 ASSERT_EQ(b.find(c, Piece::npos), Piece::npos);
248 Piece g(not_found);
249 ASSERT_EQ(a.find(g), Piece::npos);
251 ASSERT_EQ(d.find(b), Piece::npos);
252 ASSERT_EQ(e.find(b), Piece::npos);
253 ASSERT_EQ(d.find(b, 4), Piece::npos);
254 ASSERT_EQ(e.find(b, 7), Piece::npos);
269 ASSERT_EQ(a.find('$'), Piece::npos);
270 ASSERT_EQ(a.find('\0'), Piece::npos);
277 ASSERT_EQ(a.find('b', 5), Piece::npos);
279 ASSERT_EQ(d.find('\0'), Piece::npos);
280 ASSERT_EQ(e.find('\0'), Piece::npos);
281 ASSERT_EQ(d.find('\0', 4), Piece::npos);
282 ASSERT_EQ(e.find('\0', 7), Piece::npos);
283 ASSERT_EQ(d.find('x'), Piece::npos);
284 ASSERT_EQ(e.find('x'), Piece::npos);
285 ASSERT_EQ(d.find('x', 4), Piece::npos);
286 ASSERT_EQ(e.find('x', 7), Piece::npos);
291 ASSERT_EQ(a.rfind(c, 22U), Piece::npos);
292 ASSERT_EQ(a.rfind(c, 1U), Piece::npos);
293 ASSERT_EQ(a.rfind(c, 0U), Piece::npos);
294 ASSERT_EQ(b.rfind(c), Piece::npos);
295 ASSERT_EQ(b.rfind(c, 0U), Piece::npos);
302 ASSERT_EQ(a.rfind(g), Piece::npos);
303 ASSERT_EQ(d.rfind(b), Piece::npos);
304 ASSERT_EQ(e.rfind(b), Piece::npos);
305 ASSERT_EQ(d.rfind(b, 4), Piece::npos);
306 ASSERT_EQ(e.rfind(b, 7), Piece::npos);
318 ASSERT_EQ(g.rfind('q'), Piece::npos);
321 ASSERT_EQ(g.rfind('o', 3), Piece::npos);
327 ASSERT_EQ(d.rfind('o'), Piece::npos);
328 ASSERT_EQ(e.rfind('o'), Piece::npos);
329 ASSERT_EQ(d.rfind('o', 4), Piece::npos);
330 ASSERT_EQ(e.rfind('o', 7), Piece::npos);
334 ASSERT_EQ(3U, Piece(one_two_three_four).find_first_of(comma_colon));
339 ASSERT_EQ(a.find_first_of(b, 3), Piece::npos);
344 ASSERT_EQ(a.find_first_of(c, 26), Piece::npos);
347 ASSERT_EQ(a.find_first_of(f), Piece::npos);
348 ASSERT_EQ(f.find_first_of(a), Piece::npos);
350 ASSERT_EQ(a.find_first_of(d), Piece::npos);
351 ASSERT_EQ(a.find_first_of(e), Piece::npos);
352 ASSERT_EQ(d.find_first_of(b), Piece::npos);
353 ASSERT_EQ(e.find_first_of(b), Piece::npos);
354 ASSERT_EQ(d.find_first_of(d), Piece::npos);
355 ASSERT_EQ(e.find_first_of(d), Piece::npos);
356 ASSERT_EQ(d.find_first_of(e), Piece::npos);
357 ASSERT_EQ(e.find_first_of(e), Piece::npos);
361 ASSERT_EQ(b.find_first_not_of(a), Piece::npos);
362 ASSERT_EQ(c.find_first_not_of(a), Piece::npos);
368 ASSERT_EQ(d.find_first_not_of(a), Piece::npos);
369 ASSERT_EQ(e.find_first_not_of(a), Piece::npos);
370 ASSERT_EQ(d.find_first_not_of(d), Piece::npos);
371 ASSERT_EQ(e.find_first_not_of(d), Piece::npos);
372 ASSERT_EQ(d.find_first_not_of(e), Piece::npos);
373 ASSERT_EQ(e.find_first_not_of(e), Piece::npos);
376 Piece h(equals);
377 ASSERT_EQ(h.find_first_not_of('='), Piece::npos);
378 ASSERT_EQ(h.find_first_not_of('=', 3), Piece::npos);
385 ASSERT_EQ(d.find_first_not_of('x'), Piece::npos);
386 ASSERT_EQ(e.find_first_not_of('x'), Piece::npos);
387 ASSERT_EQ(d.find_first_not_of('\0'), Piece::npos);
388 ASSERT_EQ(e.find_first_not_of('\0'), Piece::npos);
390 // Piece g("xx not found bb");
392 Piece i(fifty_six);
393 ASSERT_EQ(h.find_last_of(a), Piece::npos);
403 ASSERT_EQ(a.find_last_of('b', 0), Piece::npos);
405 ASSERT_EQ(a.find_last_of('z', 24), Piece::npos);
408 ASSERT_EQ(f.find_last_of(a, 4), Piece::npos);
410 ASSERT_EQ(f.find_last_of(d), Piece::npos);
411 ASSERT_EQ(f.find_last_of(e), Piece::npos);
412 ASSERT_EQ(f.find_last_of(d, 4), Piece::npos);
413 ASSERT_EQ(f.find_last_of(e, 4), Piece::npos);
414 ASSERT_EQ(d.find_last_of(d), Piece::npos);
415 ASSERT_EQ(d.find_last_of(e), Piece::npos);
416 ASSERT_EQ(e.find_last_of(d), Piece::npos);
417 ASSERT_EQ(e.find_last_of(e), Piece::npos);
418 ASSERT_EQ(d.find_last_of(f), Piece::npos);
419 ASSERT_EQ(e.find_last_of(f), Piece::npos);
420 ASSERT_EQ(d.find_last_of(d, 4), Piece::npos);
421 ASSERT_EQ(d.find_last_of(e, 4), Piece::npos);
422 ASSERT_EQ(e.find_last_of(d, 4), Piece::npos);
423 ASSERT_EQ(e.find_last_of(e, 4), Piece::npos);
424 ASSERT_EQ(d.find_last_of(f, 4), Piece::npos);
425 ASSERT_EQ(e.find_last_of(f, 4), Piece::npos);
429 ASSERT_EQ(b.find_last_not_of(a), Piece::npos);
430 ASSERT_EQ(b.find_last_not_of(b), Piece::npos);
434 ASSERT_EQ(a.find_last_not_of(b, 2), Piece::npos);
440 ASSERT_EQ(d.find_last_not_of(d), Piece::npos);
441 ASSERT_EQ(d.find_last_not_of(e), Piece::npos);
442 ASSERT_EQ(e.find_last_not_of(d), Piece::npos);
443 ASSERT_EQ(e.find_last_not_of(e), Piece::npos);
444 ASSERT_EQ(d.find_last_not_of(f), Piece::npos);
445 ASSERT_EQ(e.find_last_not_of(f), Piece::npos);
446 ASSERT_EQ(d.find_last_not_of(d, 4), Piece::npos);
447 ASSERT_EQ(d.find_last_not_of(e, 4), Piece::npos);
448 ASSERT_EQ(e.find_last_not_of(d, 4), Piece::npos);
449 ASSERT_EQ(e.find_last_not_of(e, 4), Piece::npos);
450 ASSERT_EQ(d.find_last_not_of(f, 4), Piece::npos);
451 ASSERT_EQ(e.find_last_not_of(f, 4), Piece::npos);
454 ASSERT_EQ(h.find_last_not_of('='), Piece::npos);
457 ASSERT_EQ(h.find_last_not_of('=', 2), Piece::npos);
460 ASSERT_EQ(d.find_last_not_of('x'), Piece::npos);
461 ASSERT_EQ(e.find_last_not_of('x'), Piece::npos);
462 ASSERT_EQ(d.find_last_not_of('\0'), Piece::npos);
463 ASSERT_EQ(e.find_last_not_of('\0'), Piece::npos);
711 constexpr StringPiece piece;
712 std::ignore = piece;
716 constexpr StringPiece piece("abc");
717 std::ignore = piece;
721 constexpr StringPiece piece("abc", 2);
722 std::ignore = piece;
728 constexpr StringPiece piece;
729 static_assert(piece.data() == nullptr, "");
733 constexpr StringPiece piece("abc");
734 static_assert(piece.data()[0] == 'a', "");
735 static_assert(piece.data()[1] == 'b', "");
736 static_assert(piece.data()[2] == 'c', "");
740 constexpr StringPiece piece("def", 2);
741 static_assert(piece.data()[0] == 'd', "");
742 static_assert(piece.data()[1] == 'e', "");
748 constexpr StringPiece piece;
749 static_assert(piece.size() == 0, "");
753 constexpr StringPiece piece("abc");
754 static_assert(piece.size() == 3, "");
758 constexpr StringPiece piece("def", 2);
759 static_assert(piece.size() == 2, "");
764 constexpr StringPiece piece = "def";
766 static_assert(piece.compare("ab") == 1, "");
767 static_assert(piece.compare("abc") == 1, "");
768 static_assert(piece.compare("abcd") == 1, "");
769 static_assert(piece.compare("de") == 1, "");
770 static_assert(piece.compare("def") == 0, "");
771 static_assert(piece.compare("defg") == -1, "");
772 static_assert(piece.compare("gh") == -1, "");
773 static_assert(piece.compare("ghi") == -1, "");
774 static_assert(piece.compare("ghij") == -1, "");
778 constexpr StringPiece piece("abc");
780 static_assert(piece.starts_with(""), "");
781 static_assert(piece.starts_with("a"), "");
782 static_assert(piece.starts_with("ab"), "");
783 static_assert(piece.starts_with("abc"), "");
785 static_assert(!piece.starts_with("b"), "");
786 static_assert(!piece.starts_with("bc"), "");
788 static_assert(!piece.starts_with("abcd"), "");
792 constexpr StringPiece piece("abc");
794 static_assert(piece.ends_with(""), "");
795 static_assert(piece.ends_with("c"), "");
796 static_assert(piece.ends_with("bc"), "");
797 static_assert(piece.ends_with("abc"), "");
799 static_assert(!piece.ends_with("a"), "");
800 static_assert(!piece.ends_with("ab"), "");
802 static_assert(!piece.ends_with("abcd"), "");