From 948ec49b5a2d1601eae65d19d8da3d2c9d6752e6 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Mon, 21 Mar 2016 15:52:19 -0700 Subject: [PATCH] Have StringTest use PRI*64 instead Summary: This helps account for 32-bit vs. 64-bit compilation targets. Reviewed By: benyl Differential Revision: D3076523 fb-gh-sync-id: 56f49daaf55d242ac48f8b8d38a40c6d6230818b shipit-source-id: 56f49daaf55d242ac48f8b8d38a40c6d6230818b --- folly/test/StringTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/test/StringTest.cpp b/folly/test/StringTest.cpp index a776b88a..55ceefa0 100644 --- a/folly/test/StringTest.cpp +++ b/folly/test/StringTest.cpp @@ -40,8 +40,8 @@ TEST(StringPrintf, NumericFormats) { EXPECT_EQ("5000000000", stringPrintf("%lld", 5000000000LL)); EXPECT_EQ("-5000000000", stringPrintf("%lld", -5000000000LL)); EXPECT_EQ("-1", stringPrintf("%d", 0xffffffff)); - EXPECT_EQ("-1", stringPrintf("%ld", 0xffffffffffffffff)); - EXPECT_EQ("-1", stringPrintf("%ld", 0xffffffffffffffffUL)); + EXPECT_EQ("-1", stringPrintf("%" PRId64, 0xffffffffffffffff)); + EXPECT_EQ("-1", stringPrintf("%" PRId64, 0xffffffffffffffffUL)); EXPECT_EQ("7.7", stringPrintf("%1.1f", 7.7)); EXPECT_EQ("7.7", stringPrintf("%1.1lf", 7.7)); -- 2.34.1