diff --git a/test/chrono-test.cc b/test/chrono-test.cc index 71a64d462102..e3615e856022 100644 --- a/test/chrono-test.cc +++ b/test/chrono-test.cc @@ -324,4 +324,8 @@ TEST(ChronoTest, DurationIsDoubleNaN) { auto ignored=fmt::format("{:%I}",d); } +TEST(ChronoTest, OverflowingFloat) { + const std::chrono::duration d{std::numeric_limits::max()*0.5f}; + auto ignored=fmt::format("{:%I}",d); +} #endif // FMT_STATIC_THOUSANDS_SEPARATOR