Index: base/strings/string_split_unittest.cc |
diff --git a/base/strings/string_split_unittest.cc b/base/strings/string_split_unittest.cc |
index a950cac5b105d52a023aba4107dd5297a1a69b92..6729497c7359512b3fa8f8d2f8fc02dec18d298f 100644 |
--- a/base/strings/string_split_unittest.cc |
+++ b/base/strings/string_split_unittest.cc |
@@ -36,9 +36,10 @@ class SplitStringIntoKeyValuesTest : public testing::Test { |
}; |
TEST_F(SplitStringIntoKeyValuesTest, EmptyInputMultipleValues) { |
- EXPECT_FALSE(SplitStringIntoKeyValues("", // Empty input |
- '\t', // Key separators |
- &key, &values)); |
+ EXPECT_FALSE(SplitStringIntoKeyValues(std::string(), // Empty input |
+ '\t', // Key separators |
+ &key, |
+ &values)); |
EXPECT_TRUE(key.empty()); |
EXPECT_TRUE(values.empty()); |
} |
@@ -69,9 +70,10 @@ TEST_F(SplitStringIntoKeyValuesTest, KeyWithMultipleValues) { |
} |
TEST_F(SplitStringIntoKeyValuesTest, EmptyInputSingleValue) { |
- EXPECT_FALSE(SplitStringIntoKeyValues("", // Empty input |
- '\t', // Key separators |
- &key, &values)); |
+ EXPECT_FALSE(SplitStringIntoKeyValues(std::string(), // Empty input |
+ '\t', // Key separators |
+ &key, |
+ &values)); |
EXPECT_TRUE(key.empty()); |
EXPECT_TRUE(values.empty()); |
} |
@@ -108,9 +110,9 @@ class SplitStringIntoKeyValuePairsTest : public testing::Test { |
}; |
TEST_F(SplitStringIntoKeyValuePairsTest, EmptyString) { |
- EXPECT_TRUE(SplitStringIntoKeyValuePairs("", |
- ':', // Key-value delimiters |
- ',', // Key-value pair delims |
+ EXPECT_TRUE(SplitStringIntoKeyValuePairs(std::string(), |
+ ':', // Key-value delimiters |
+ ',', // Key-value pair delims |
&kv_pairs)); |
EXPECT_TRUE(kv_pairs.empty()); |
} |
@@ -153,7 +155,7 @@ TEST_F(SplitStringIntoKeyValuePairsTest, DelimiterInValue) { |
TEST(SplitStringUsingSubstrTest, EmptyString) { |
std::vector<std::string> results; |
- SplitStringUsingSubstr("", "DELIMITER", &results); |
+ SplitStringUsingSubstr(std::string(), "DELIMITER", &results); |
ASSERT_EQ(1u, results.size()); |
EXPECT_THAT(results, ElementsAre("")); |
} |
@@ -162,7 +164,7 @@ TEST(SplitStringUsingSubstrTest, EmptyString) { |
TEST(StringUtilTest, SplitString) { |
std::vector<std::wstring> r; |
- SplitString(L"", L',', &r); |
+ SplitString(std::wstring(), L',', &r); |
EXPECT_EQ(0U, r.size()); |
r.clear(); |