diff options
Diffstat (limited to 'absl/strings')
-rw-r--r-- | absl/strings/str_split_test.cc | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/absl/strings/str_split_test.cc b/absl/strings/str_split_test.cc index 4b8e7d6b..02f27bc4 100644 --- a/absl/strings/str_split_test.cc +++ b/absl/strings/str_split_test.cc @@ -71,8 +71,8 @@ TEST(Split, TraitsTest) { // namespaces just like callers will need to use. TEST(Split, APIExamples) { { - // Passes std::string delimiter. Assumes the default of Literal. - std::vector<std::string> v = absl::StrSplit("a,b,c", ','); + // Passes std::string delimiter. Assumes the default of ByString. + std::vector<std::string> v = absl::StrSplit("a,b,c", ","); // NOLINT EXPECT_THAT(v, ElementsAre("a", "b", "c")); // Equivalent to... @@ -97,17 +97,6 @@ TEST(Split, APIExamples) { } { - // Same as above, but using std::string - std::vector<std::string> v = absl::StrSplit("a,b,c", ','); - EXPECT_THAT(v, ElementsAre("a", "b", "c")); - - // Equivalent to... - using absl::ByChar; - v = absl::StrSplit("a,b,c", ByChar(',')); - EXPECT_THAT(v, ElementsAre("a", "b", "c")); - } - - { // Uses the Literal std::string "=>" as the delimiter. const std::vector<std::string> v = absl::StrSplit("a=>b=>c", "=>"); EXPECT_THAT(v, ElementsAre("a", "b", "c")); @@ -797,7 +786,7 @@ static bool IsFoundAt(absl::string_view text, Delimiter d, int expected_pos) { } // -// Tests for Literal +// Tests for ByString // // Tests using any delimiter that represents a single comma. @@ -817,7 +806,7 @@ void TestComma(Delimiter d) { EXPECT_FALSE(IsFoundAt(";", d, -1)); } -TEST(Delimiter, Literal) { +TEST(Delimiter, ByString) { using absl::ByString; TestComma(ByString(",")); |