summaryrefslogtreecommitdiffstats
path: root/base/string_split_unittest.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-26 23:37:02 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-26 23:37:02 +0000
commit17350d35a047286d79010e0abfea3d84722d3dc7 (patch)
tree273c226b2d0eebdbb287dc04f260c7541775b297 /base/string_split_unittest.cc
parentbd52a98b4ef0149a544c45a3dbf870ce3f384688 (diff)
downloadchromium_src-17350d35a047286d79010e0abfea3d84722d3dc7.zip
chromium_src-17350d35a047286d79010e0abfea3d84722d3dc7.tar.gz
chromium_src-17350d35a047286d79010e0abfea3d84722d3dc7.tar.bz2
Make SplitString() and variants clear their outparam vector. (Note that SplitStringIntoKeyValues() and SplitStringIntoKeyValuePairs() already did this.) This is more in line with what other APIs that take outparams do.
I audited all callers, and the only ones affected by this are the buggy ones in bug 134695 that already wanted this behavior, as well as the couple of places in this CL that were manually calling clear() and now don't have to. BUG=134695 TEST=none TBR=brettw,phajdan.jr Review URL: https://chromiumcodereview.appspot.com/10684003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_split_unittest.cc')
-rw-r--r--base/string_split_unittest.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/base/string_split_unittest.cc b/base/string_split_unittest.cc
index 5d4dafe..a4412e4 100644
--- a/base/string_split_unittest.cc
+++ b/base/string_split_unittest.cc
@@ -267,7 +267,6 @@ TEST(StringSplitTest, StringSplitDontTrim) {
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 @@ TEST(StringSplitTest, StringSplitDontTrim) {
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) {