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

Unified Diff: base/string_split_unittest.cc

Issue 10684003: Make SplitString() and variants clear their outparam vector. (Note that SplitStringIntoKeyValues()… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/string_split.cc ('k') | net/ftp/ftp_directory_listing_parser_vms.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_split_unittest.cc
===================================================================
--- base/string_split_unittest.cc (revision 144240)
+++ base/string_split_unittest.cc (working copy)
@@ -267,7 +267,6 @@
SplitStringDontTrim(" ", '*', &r);
ASSERT_EQ(1U, r.size());
EXPECT_EQ(r[0], " ");
- r.clear();
SplitStringDontTrim("\t \ta\t ", '\t', &r);
ASSERT_EQ(4U, r.size());
@@ -275,13 +274,11 @@
EXPECT_EQ(r[1], " ");
EXPECT_EQ(r[2], "a");
EXPECT_EQ(r[3], " ");
- r.clear();
SplitStringDontTrim("\ta\t\nb\tcc", '\n', &r);
ASSERT_EQ(2U, r.size());
EXPECT_EQ(r[0], "\ta\t");
EXPECT_EQ(r[1], "b\tcc");
- r.clear();
}
TEST(StringSplitTest, SplitStringAlongWhitespace) {
« no previous file with comments | « base/string_split.cc ('k') | net/ftp/ftp_directory_listing_parser_vms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698