OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // The original source code is from: | 5 // The original source code is from: |
6 // http://src.chromium.org/viewvc/chrome/trunk/src/base/strings/string_split_uni
ttest.cc?revision=216633 | 6 // http://src.chromium.org/viewvc/chrome/trunk/src/base/strings/string_split_uni
ttest.cc?revision=216633 |
7 | 7 |
8 #include "util/string_split.h" | 8 #include "util/string_util.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include <gtest/gtest.h> | 13 #include <gtest/gtest.h> |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 using i18n::addressinput::SplitString; | 17 using i18n::addressinput::SplitString; |
18 | 18 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 EXPECT_EQ(r[2], "a"); | 80 EXPECT_EQ(r[2], "a"); |
81 EXPECT_EQ(r[3], " "); | 81 EXPECT_EQ(r[3], " "); |
82 | 82 |
83 SplitString("\ta\t\nb\tcc", '\n', &r); | 83 SplitString("\ta\t\nb\tcc", '\n', &r); |
84 ASSERT_EQ(2U, r.size()); | 84 ASSERT_EQ(2U, r.size()); |
85 EXPECT_EQ(r[0], "\ta\t"); | 85 EXPECT_EQ(r[0], "\ta\t"); |
86 EXPECT_EQ(r[1], "b\tcc"); | 86 EXPECT_EQ(r[1], "b\tcc"); |
87 } | 87 } |
88 | 88 |
89 } // namespace | 89 } // namespace |
OLD | NEW |