Chromium Code Reviews| Index: base/string_split_unittest.cc |
| diff --git a/base/string_split_unittest.cc b/base/string_split_unittest.cc |
| index 749d56662b7e25ee4c0f1dddbc1f31e424d0b5d4..7af0a148e46e5be0e55227a68882954953861908 100644 |
| --- a/base/string_split_unittest.cc |
| +++ b/base/string_split_unittest.cc |
| @@ -1,8 +1,10 @@ |
| -// Copyright (c) 2010 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. |
| #include "base/string_split.h" |
| + |
| +#include "base/utf_string_conversions.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| @@ -10,6 +12,21 @@ using ::testing::ElementsAre; |
| namespace base { |
| +namespace { |
|
Evan Martin
2011/05/05 20:52:24
Not sure about this; I think the test had the abov
brettw
2011/05/05 21:09:41
I normally put the tests in the base namespace sin
|
| + |
| +#if !defined(WCHAR_T_IS_UTF16) |
| +// Overload SplitString with a wide-char version to make it easier to |
| +// test the string16 version with wide character literals. |
| +void SplitString(const std::wstring& str, |
| + wchar_t c, |
| + std::vector<std::wstring>* result) { |
| + std::vector<string16> result16; |
| + SplitString(WideToUTF16(str), c, &result16); |
| + for (size_t i = 0; i < result16.size(); ++i) |
| + result->push_back(UTF16ToWide(result16[i])); |
| +} |
| +#endif |
| + |
| class SplitStringIntoKeyValuesTest : public testing::Test { |
| protected: |
| std::string key; |
| @@ -294,4 +311,6 @@ TEST(StringSplitTest, SplitStringAlongWhitespace) { |
| } |
| } |
| +} // namespace |
| + |
| } // namespace base |