Skip to content

Commit

Permalink
Suppress a -Wliteral-range warning on Apple M1
Browse files Browse the repository at this point in the history
  • Loading branch information
phprus committed Apr 19, 2022
1 parent 5d804ee commit 3082398
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/format-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,9 @@ TEST(format_test, precision) {
if (std::numeric_limits<long double>::digits == 64) {
auto ld = (std::numeric_limits<long double>::min)();
EXPECT_EQ(fmt::format("{:.0}", ld), "3e-4932");
EXPECT_EQ(fmt::format("{:0g}", 5.02957084971264961283E-4940L),
"5.02957e-4940");
EXPECT_EQ(
fmt::format("{:0g}", std::numeric_limits<long double>::denorm_min()),
"5.02957e-4940");
}

EXPECT_EQ("123.", fmt::format("{:#.0f}", 123.0));
Expand Down

0 comments on commit 3082398

Please sign in to comment.