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

This commit is contained in:
Vladislav Shchapov 2022-04-19 23:10:18 +05:00 committed by GitHub
parent 5d804ee7fe
commit ffb5e6a732
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));