diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 17:42:13 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 17:42:13 +0000 |
commit | cf81d2d225d0288a91d4ae0d7e284c1b668623d4 (patch) | |
tree | 466d0f48eaeee7efe83aa0acdf13f9bc6aa73d7f /base/string_util_unittest.cc | |
parent | 38d3c10950bc050ec1b5fc78b2bba4ab01231d71 (diff) | |
download | chromium_src-cf81d2d225d0288a91d4ae0d7e284c1b668623d4.zip chromium_src-cf81d2d225d0288a91d4ae0d7e284c1b668623d4.tar.gz chromium_src-cf81d2d225d0288a91d4ae0d7e284c1b668623d4.tar.bz2 |
wstring: remove wstring version of TrimWhitespace
And fix the one caller.
BUG=23581
Review URL: http://codereview.chromium.org/6932056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util_unittest.cc')
-rw-r--r-- | base/string_util_unittest.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc index cd45642..3731d4c 100644 --- a/base/string_util_unittest.cc +++ b/base/string_util_unittest.cc @@ -1,4 +1,4 @@ -// 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. @@ -225,23 +225,24 @@ TEST(StringUtilTest, TruncateUTF8ToByteSize) { } TEST(StringUtilTest, TrimWhitespace) { - std::wstring output; // Allow contents to carry over to next testcase + string16 output; // Allow contents to carry over to next testcase for (size_t i = 0; i < arraysize(trim_cases); ++i) { const trim_case& value = trim_cases[i]; EXPECT_EQ(value.return_value, - TrimWhitespace(value.input, value.positions, &output)); - EXPECT_EQ(value.output, output); + TrimWhitespace(WideToUTF16(value.input), value.positions, + &output)); + EXPECT_EQ(WideToUTF16(value.output), output); } // Test that TrimWhitespace() can take the same string for input and output - output = L" This is a test \r\n"; + output = ASCIIToUTF16(" This is a test \r\n"); EXPECT_EQ(TRIM_ALL, TrimWhitespace(output, TRIM_ALL, &output)); - EXPECT_EQ(L"This is a test", output); + EXPECT_EQ(ASCIIToUTF16("This is a test"), output); // Once more, but with a string of whitespace - output = L" \r\n"; + output = ASCIIToUTF16(" \r\n"); EXPECT_EQ(TRIM_ALL, TrimWhitespace(output, TRIM_ALL, &output)); - EXPECT_EQ(L"", output); + EXPECT_EQ(ASCIIToUTF16(""), output); std::string output_ascii; for (size_t i = 0; i < arraysize(trim_cases_ascii); ++i) { |