Have StringTest use PRI*64 instead
authorMichael Lee <mzlee@fb.com>
Mon, 21 Mar 2016 22:52:19 +0000 (15:52 -0700)
committerFacebook Github Bot 7 <facebook-github-bot-7-bot@fb.com>
Mon, 21 Mar 2016 23:05:22 +0000 (16:05 -0700)
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

index a776b88a098215b251d51436d6f8768e7101f083..55ceefa03fa019c41916dfe8044ed26b0908a770 100644 (file)
@@ -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));