Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress a -Wliteral-range warning on Apple M1 #2861

Merged
merged 1 commit into from
Apr 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()),
"3.6452e-4951");
}

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