| Index: base/strings/stringprintf_unittest.cc
|
| diff --git a/base/strings/stringprintf_unittest.cc b/base/strings/stringprintf_unittest.cc
|
| index c49637c23f256fe321414576c9b6a4eaac45136c..e0b320fe452c8368cbd6d956f43c4051bce9a5c6 100644
|
| --- a/base/strings/stringprintf_unittest.cc
|
| +++ b/base/strings/stringprintf_unittest.cc
|
| @@ -148,10 +148,10 @@ TEST(StringPrintfTest, GrowBoundary) {
|
| EXPECT_STREQ(src, out.c_str());
|
| }
|
|
|
| -// TODO(evanm): what's the proper cross-platform test here?
|
| #if defined(OS_WIN)
|
| -// sprintf in Visual Studio fails when given U+FFFF. This tests that the
|
| -// failure case is gracefuly handled.
|
| +// vswprintf in Visual Studio 2013 fails when given U+FFFF. This tests that the
|
| +// failure case is gracefuly handled. In Visual Studio 2015 the bad character
|
| +// is passed through.
|
| TEST(StringPrintfTest, Invalid) {
|
| wchar_t invalid[2];
|
| invalid[0] = 0xffff;
|
| @@ -159,7 +159,11 @@ TEST(StringPrintfTest, Invalid) {
|
|
|
| std::wstring out;
|
| SStringPrintf(&out, L"%ls", invalid);
|
| +#if _MSC_VER >= 1900
|
| + EXPECT_STREQ(invalid, out.c_str());
|
| +#else
|
| EXPECT_STREQ(L"", out.c_str());
|
| +#endif
|
| }
|
| #endif
|
|
|
|
|