Index: base/string_split_unittest.cc |
diff --git a/base/string_split_unittest.cc b/base/string_split_unittest.cc |
index 5d4dafe9a6f6a4e214d78ada57a4231bcfa9c894..83e4d7449d83034a2450e4db000189005792e99e 100644 |
--- a/base/string_split_unittest.cc |
+++ b/base/string_split_unittest.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -163,7 +163,8 @@ TEST(StringUtilTest, SplitString) { |
std::vector<std::wstring> r; |
SplitString(L"", L',', &r); |
- EXPECT_EQ(0U, r.size()); |
+ ASSERT_EQ(1U, r.size()); |
+ EXPECT_EQ(r[0], L""); |
r.clear(); |
SplitString(L"a,b,c", L',', &r); |
@@ -187,8 +188,9 @@ TEST(StringUtilTest, SplitString) { |
EXPECT_EQ(r[2], L"c"); |
r.clear(); |
- SplitString(L" ", L'*', &r); |
- EXPECT_EQ(0U, r.size()); |
+ SplitString(L"", L'*', &r); |
+ ASSERT_EQ(1U, r.size()); |
+ EXPECT_EQ(r[0], L""); |
r.clear(); |
SplitString(L"foo", L'*', &r); |
@@ -264,17 +266,12 @@ TEST(SplitStringUsingSubstrTest, TrailingDelimitersSkipped) { |
TEST(StringSplitTest, StringSplitDontTrim) { |
std::vector<std::string> r; |
- SplitStringDontTrim(" ", '*', &r); |
- ASSERT_EQ(1U, r.size()); |
- EXPECT_EQ(r[0], " "); |
- r.clear(); |
- |
- SplitStringDontTrim("\t \ta\t ", '\t', &r); |
+ SplitStringDontTrim("\t\ta\t", '\t', &r); |
ASSERT_EQ(4U, r.size()); |
EXPECT_EQ(r[0], ""); |
- EXPECT_EQ(r[1], " "); |
+ EXPECT_EQ(r[1], ""); |
EXPECT_EQ(r[2], "a"); |
- EXPECT_EQ(r[3], " "); |
+ EXPECT_EQ(r[3], ""); |
r.clear(); |
SplitStringDontTrim("\ta\t\nb\tcc", '\n', &r); |