summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_wstring_unittest.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-30 15:28:23 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-30 23:00:56 +0000
commit3efc06752c56b731e11d37310b981254c1ba461c (patch)
treeb497a162a0f60ea3101d84d678662ab6ff8bf672 /core/fxcrt/fx_basic_wstring_unittest.cpp
parentbf9104d5825d9f62b59106d69edebb1b5bdd48da (diff)
downloadpdfium-chromium/3057.tar.xz
vswprintf() part 2: retry when clearly out of space.chromium/3057
Use vendor guidance if possible. Otherwise, avoid allocating N^2 storage for N wide chars. Update tests to account for strings removed from helper. Change-Id: I38bbaf936656fb43ec1ae33652da4cabde00247a Reviewed-on: https://pdfium-review.googlesource.com/3433 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_basic_wstring_unittest.cpp')
-rw-r--r--core/fxcrt/fx_basic_wstring_unittest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/fx_basic_wstring_unittest.cpp b/core/fxcrt/fx_basic_wstring_unittest.cpp
index ceb4616b8a..c5151709e0 100644
--- a/core/fxcrt/fx_basic_wstring_unittest.cpp
+++ b/core/fxcrt/fx_basic_wstring_unittest.cpp
@@ -890,7 +890,7 @@ TEST(fxcrt, WideStringFormatWidth) {
{
CFX_WideString str;
str.Format(L"%1048576d", 1);
- EXPECT_EQ(L"Bad width", str);
+ EXPECT_EQ(L"", str);
}
}
@@ -928,7 +928,7 @@ TEST(fxcrt, WideStringFormatPrecision) {
{
CFX_WideString str;
str.Format(L"%.1048576f", 1.2);
- EXPECT_EQ(L"Bad precision", str);
+ EXPECT_EQ(L"", str);
}
}