summaryrefslogtreecommitdiff
path: root/core/src/fxcrt
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-07 16:08:29 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-07 16:08:29 -0700
commit290b2351d06f0bc994e58394ab948244c08e82af (patch)
tree95d1e0873008f3ff8a7c966391b38944f823317e /core/src/fxcrt
parent9778206732296e949ef22a79362c6bce34a56052 (diff)
downloadpdfium-290b2351d06f0bc994e58394ab948244c08e82af.tar.xz
Fix win unit tests broken at 9778206.
Windows uses the system implementation of itoa which goes to 36. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1285433002 .
Diffstat (limited to 'core/src/fxcrt')
-rw-r--r--core/src/fxcrt/fx_system_unittest.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/src/fxcrt/fx_system_unittest.cpp b/core/src/fxcrt/fx_system_unittest.cpp
index ae1e41c77e..e1a986e72d 100644
--- a/core/src/fxcrt/fx_system_unittest.cpp
+++ b/core/src/fxcrt/fx_system_unittest.cpp
@@ -73,7 +73,11 @@ void Check64BitBase2Itoa(int64_t input, const char* expected_output) {
TEST(fxcrt, FXSYS_itoa_InvalidRadix) {
FX_CHAR buf[32];
- FXSYS_itoa(42, buf, 17);
+#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+ FXSYS_itoa(42, buf, 17); // Ours stops at 16.
+#else
+ FXSYS_itoa(42, buf, 37); // Theirs goes up to 36.
+#endif
EXPECT_EQ(std::string(""), buf);
FXSYS_itoa(42, buf, 1);
@@ -114,7 +118,11 @@ TEST(fxcrt, FXSYS_itoa) {
TEST(fxcrt, FXSYS_i64toa_InvalidRadix) {
FX_CHAR buf[32];
- FXSYS_i64toa(42, buf, 17);
+#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+ FXSYS_i64toa(42, buf, 17); // Ours stops at 16.
+#else
+ FXSYS_i64toa(42, buf, 37); // Theirs goes up to 36.
+#endif
EXPECT_EQ(std::string(""), buf);
FXSYS_i64toa(42, buf, 1);