summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_bstring_unittest.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-29 13:32:14 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-29 21:11:33 +0000
commitcbb02c07924757794f611235ea16bee6717918c4 (patch)
tree306ce2584abdba80937ac06355bd6dff8e4e7754 /core/fxcrt/fx_basic_bstring_unittest.cpp
parente778668fe92b8c60e0537ee48f79d5af6c1a2f1e (diff)
downloadpdfium-cbb02c07924757794f611235ea16bee6717918c4.tar.xz
Avoid guessing vsnprintf() buffer length.
This pattern is widely used in chrome. Change-Id: I64229b2ce298bf78773fe47c68d19be59411a76a Reviewed-on: https://pdfium-review.googlesource.com/3293 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_basic_bstring_unittest.cpp')
-rw-r--r--core/fxcrt/fx_basic_bstring_unittest.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/core/fxcrt/fx_basic_bstring_unittest.cpp b/core/fxcrt/fx_basic_bstring_unittest.cpp
index a58169d039..e234989bf0 100644
--- a/core/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/fxcrt/fx_basic_bstring_unittest.cpp
@@ -1047,12 +1047,6 @@ TEST(fxcrt, ByteStringFormatWidth) {
str.Format("%0d", 1);
EXPECT_EQ("1", str);
}
-
- {
- CFX_ByteString str;
- str.Format("%1048576d", 1);
- EXPECT_EQ("Bad width", str);
- }
}
TEST(fxcrt, ByteStringFormatPrecision) {
@@ -1085,12 +1079,6 @@ TEST(fxcrt, ByteStringFormatPrecision) {
str.Format("%0f", 1.12345);
EXPECT_EQ("1.123450", str);
}
-
- {
- CFX_ByteString str;
- str.Format("%.1048576f", 1.2);
- EXPECT_EQ("Bad precision", str);
- }
}
TEST(fxcrt, EmptyByteString) {