Fix formatting of extreme durations (#1154)

This commit is contained in:
Victor Zverovich
2019-05-11 08:42:02 -07:00
parent ea2976e6d5
commit de5da50910
4 changed files with 16 additions and 21 deletions

View File

@@ -318,6 +318,10 @@ TEST(ChronoTest, SpecialDurations) {
fmt::format("{:%I %H %M %S %R %r}", std::chrono::duration<double>(nan)));
fmt::format("{:%S}",
std::chrono::duration<float, std::atto>(1.79400457e+31f));
EXPECT_EQ(fmt::format("{}", std::chrono::duration<float, std::exa>(1)),
"1Es");
EXPECT_EQ(fmt::format("{}", std::chrono::duration<float, std::atto>(1)),
"1as");
}
#endif // FMT_STATIC_THOUSANDS_SEPARATOR