Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2335)

Unified Diff: base/strings/string_util_unittest.cc

Issue 768973003: Cleanup: Get rid of base::ASCIIToWide(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/strings/utf_string_conversions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util_unittest.cc
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index f29baac17b45d693d4c0b5a1f37e0f9248815ac3..923116d115bd055d7db39162a642584a183a36da 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -494,10 +494,10 @@ TEST(StringUtilTest, ConvertASCII) {
const char chars_with_nul[] = "test\0string";
const int length_with_nul = arraysize(chars_with_nul) - 1;
std::string string_with_nul(chars_with_nul, length_with_nul);
- std::wstring wide_with_nul = ASCIIToWide(string_with_nul);
- EXPECT_EQ(static_cast<std::wstring::size_type>(length_with_nul),
- wide_with_nul.length());
- std::string narrow_with_nul = UTF16ToASCII(WideToUTF16(wide_with_nul));
+ base::string16 string16_with_nul = ASCIIToUTF16(string_with_nul);
+ EXPECT_EQ(static_cast<base::string16::size_type>(length_with_nul),
+ string16_with_nul.length());
+ std::string narrow_with_nul = UTF16ToASCII(string16_with_nul);
EXPECT_EQ(static_cast<std::string::size_type>(length_with_nul),
narrow_with_nul.length());
EXPECT_EQ(0, string_with_nul.compare(narrow_with_nul));
« no previous file with comments | « no previous file | base/strings/utf_string_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698