From 290b2351d06f0bc994e58394ab948244c08e82af Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 7 Aug 2015 16:08:29 -0700 Subject: 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 . --- core/src/fxcrt/fx_system_unittest.cpp | 12 ++++++++++-- 1 file 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); -- cgit v1.2.3