Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3235)

Unified Diff: base/strings/string_split_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/strings/string_split.cc ('k') | base/sys_info_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « base/strings/string_split.cc ('k') | base/sys_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698