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

Unified Diff: base/strings/stringprintf_unittest.cc

Issue 1410333006: Enough hacks to make wstring printfs unneeded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: base/strings/stringprintf_unittest.cc
diff --git a/base/strings/stringprintf_unittest.cc b/base/strings/stringprintf_unittest.cc
index c49637c23f256fe321414576c9b6a4eaac45136c..af4eaec41ba86c2655d2e7cf53d85d49aa61d948 100644
--- a/base/strings/stringprintf_unittest.cc
+++ b/base/strings/stringprintf_unittest.cc
@@ -32,7 +32,7 @@ TEST(StringPrintfTest, StringPrintfEmpty) {
TEST(StringPrintfTest, StringPrintfMisc) {
EXPECT_EQ("123hello w", StringPrintf("%3d%2s %1c", 123, "hello", 'w'));
#if defined(OS_WIN)
- EXPECT_EQ(L"123hello w", StringPrintf(L"%3d%2ls %1lc", 123, L"hello", 'w'));
+// EXPECT_EQ(L"123hello w", StringPrintf(L"%3d%2ls %1lc", 123, L"hello", 'w'));
#endif
}
@@ -41,11 +41,11 @@ TEST(StringPrintfTest, StringAppendfEmptyString) {
StringAppendF(&value, "%s", "");
EXPECT_EQ("Hello", value);
-#if defined(OS_WIN)
+/*#if defined(OS_WIN)
std::wstring valuew(L"Hello");
StringAppendF(&valuew, L"%ls", L"");
EXPECT_EQ(L"Hello", valuew);
-#endif
+#endif*/
}
TEST(StringPrintfTest, StringAppendfString) {
@@ -53,11 +53,11 @@ TEST(StringPrintfTest, StringAppendfString) {
StringAppendF(&value, " %s", "World");
EXPECT_EQ("Hello World", value);
-#if defined(OS_WIN)
+/*#if defined(OS_WIN)
std::wstring valuew(L"Hello");
StringAppendF(&valuew, L" %ls", L"World");
EXPECT_EQ(L"Hello World", valuew);
-#endif
+#endif*/
}
TEST(StringPrintfTest, StringAppendfInt) {
@@ -65,11 +65,11 @@ TEST(StringPrintfTest, StringAppendfInt) {
StringAppendF(&value, " %d", 123);
EXPECT_EQ("Hello 123", value);
-#if defined(OS_WIN)
+/*#if defined(OS_WIN)
std::wstring valuew(L"Hello");
StringAppendF(&valuew, L" %d", 123);
EXPECT_EQ(L"Hello 123", valuew);
-#endif
+#endif*/
}
// Make sure that lengths exactly around the initial buffer size are handled
@@ -90,12 +90,12 @@ TEST(StringPrintfTest, StringPrintfBounds) {
SStringPrintf(&out, "%s", src);
EXPECT_STREQ(src, out.c_str());
-#if defined(OS_WIN)
+/*#if defined(OS_WIN)
srcw[kSrcLen - i] = 0;
std::wstring outw;
SStringPrintf(&outw, L"%ls", srcw);
EXPECT_STREQ(srcw, outw.c_str());
-#endif
+#endif*/
}
}
@@ -152,7 +152,7 @@ TEST(StringPrintfTest, GrowBoundary) {
#if defined(OS_WIN)
// sprintf in Visual Studio fails when given U+FFFF. This tests that the
// failure case is gracefuly handled.
-TEST(StringPrintfTest, Invalid) {
+/*TEST(StringPrintfTest, Invalid) {
wchar_t invalid[2];
invalid[0] = 0xffff;
invalid[1] = 0;
@@ -160,7 +160,7 @@ TEST(StringPrintfTest, Invalid) {
std::wstring out;
SStringPrintf(&out, L"%ls", invalid);
EXPECT_STREQ(L"", out.c_str());
-}
+}*/
#endif
// Test that StringPrintf and StringAppendV do not change errno.

Powered by Google App Engine
This is Rietveld 408576698