Lines Matching refs:piece
711 constexpr StringPiece piece; in TEST() local
712 std::ignore = piece; in TEST()
716 constexpr StringPiece piece("abc"); in TEST() local
717 std::ignore = piece; in TEST()
721 constexpr StringPiece piece("abc", 2); in TEST() local
722 std::ignore = piece; in TEST()
728 constexpr StringPiece piece; in TEST() local
729 static_assert(piece.data() == nullptr, ""); in TEST()
733 constexpr StringPiece piece("abc"); in TEST() local
734 static_assert(piece.data()[0] == 'a', ""); in TEST()
735 static_assert(piece.data()[1] == 'b', ""); in TEST()
736 static_assert(piece.data()[2] == 'c', ""); in TEST()
740 constexpr StringPiece piece("def", 2); in TEST() local
741 static_assert(piece.data()[0] == 'd', ""); in TEST()
742 static_assert(piece.data()[1] == 'e', ""); in TEST()
748 constexpr StringPiece piece; in TEST() local
749 static_assert(piece.size() == 0, ""); in TEST()
753 constexpr StringPiece piece("abc"); in TEST() local
754 static_assert(piece.size() == 3, ""); in TEST()
758 constexpr StringPiece piece("def", 2); in TEST() local
759 static_assert(piece.size() == 2, ""); in TEST()
764 constexpr StringPiece piece = "def"; in TEST() local
766 static_assert(piece.compare("ab") == 1, ""); in TEST()
767 static_assert(piece.compare("abc") == 1, ""); in TEST()
768 static_assert(piece.compare("abcd") == 1, ""); in TEST()
769 static_assert(piece.compare("de") == 1, ""); in TEST()
770 static_assert(piece.compare("def") == 0, ""); in TEST()
771 static_assert(piece.compare("defg") == -1, ""); in TEST()
772 static_assert(piece.compare("gh") == -1, ""); in TEST()
773 static_assert(piece.compare("ghi") == -1, ""); in TEST()
774 static_assert(piece.compare("ghij") == -1, ""); in TEST()
778 constexpr StringPiece piece("abc"); in TEST() local
780 static_assert(piece.starts_with(""), ""); in TEST()
781 static_assert(piece.starts_with("a"), ""); in TEST()
782 static_assert(piece.starts_with("ab"), ""); in TEST()
783 static_assert(piece.starts_with("abc"), ""); in TEST()
785 static_assert(!piece.starts_with("b"), ""); in TEST()
786 static_assert(!piece.starts_with("bc"), ""); in TEST()
788 static_assert(!piece.starts_with("abcd"), ""); in TEST()
792 constexpr StringPiece piece("abc"); in TEST() local
794 static_assert(piece.ends_with(""), ""); in TEST()
795 static_assert(piece.ends_with("c"), ""); in TEST()
796 static_assert(piece.ends_with("bc"), ""); in TEST()
797 static_assert(piece.ends_with("abc"), ""); in TEST()
799 static_assert(!piece.ends_with("a"), ""); in TEST()
800 static_assert(!piece.ends_with("ab"), ""); in TEST()
802 static_assert(!piece.ends_with("abcd"), ""); in TEST()