Use the same rep type for seconds to prevent overflow

This commit is contained in:
Victor Zverovich
2019-05-04 09:22:09 -07:00
parent 241414028d
commit 38a85502ed
2 changed files with 23 additions and 7 deletions

View File

@@ -306,4 +306,8 @@ TEST(ChronoTest, InvalidColons) {
fmt::format_error);
}
TEST(ChronoTest, LargeDuration) {
EXPECT_EQ("40", fmt::format("{:%S}", std::chrono::duration<double>(1e20)));
}
#endif // FMT_STATIC_THOUSANDS_SEPARATOR