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

Unified Diff: base/string_util_unittest.cc

Issue 99365: Lands http://codereview.chromium.org/99349 for Ryan.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 months 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 | « base/debug_util_posix.cc ('k') | build/build_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util_unittest.cc
===================================================================
--- base/string_util_unittest.cc (revision 15203)
+++ base/string_util_unittest.cc (working copy)
@@ -311,7 +311,11 @@
std::wstring converted;
EXPECT_TRUE(UTF8ToWide("\00Z\t", 3, &converted));
ASSERT_EQ(3U, converted.length());
+#if defined(WCHAR_T_IS_UNSIGNED)
+ EXPECT_EQ(0U, converted[0]);
+#else
EXPECT_EQ(0, converted[0]);
+#endif
EXPECT_EQ('Z', converted[1]);
EXPECT_EQ('\t', converted[2]);
@@ -1509,8 +1513,13 @@
EXPECT_EQ(1, dst[0]);
EXPECT_EQ(2, dst[1]);
EXPECT_EQ(7U, base::wcslcpy(wdst, L"abcdefg", 0));
+#if defined(WCHAR_T_IS_UNSIGNED)
+ EXPECT_EQ(1U, wdst[0]);
+ EXPECT_EQ(2U, wdst[1]);
+#else
EXPECT_EQ(1, wdst[0]);
EXPECT_EQ(2, wdst[1]);
+#endif
}
// Test the case were we _just_ competely fit including the null.
« no previous file with comments | « base/debug_util_posix.cc ('k') | build/build_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698