Commit 2e540877 authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

Fix format warning in StringTest.cpp

Summary:
Clang warns about formatting when we were using `stringPrintf` to print
the result of overflowing an unsigned 64-bit value.

Closes issue #757.
Closes https://github.com/facebook/folly/pull/765

Reviewed By: simpkins

Differential Revision: D6934612

Pulled By: yfeldblum

fbshipit-source-id: df8c29c0ca8a47aca99007b5182529df17a27149
parent 0bb8ba0c
......@@ -48,8 +48,12 @@ 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("%" PRId64, 0xffffffffffffffff));
EXPECT_EQ("-1", stringPrintf("%" PRId64, 0xffffffffffffffffUL));
EXPECT_EQ(
"-1",
stringPrintf("%" PRId64, static_cast<int64_t>(0xffffffffffffffffLL)));
EXPECT_EQ(
"-1",
stringPrintf("%" PRId64, static_cast<uint64_t>(0xffffffffffffffffULL)));
EXPECT_EQ("7.7", stringPrintf("%1.1f", 7.7));
EXPECT_EQ("7.7", stringPrintf("%1.1lf", 7.7));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment