Fix handling of zero precision

This commit is contained in:
Victor Zverovich
2019-04-19 14:48:42 -07:00
parent 6b20863918
commit 946498cfbc
2 changed files with 5 additions and 1 deletions

View File

@@ -52,3 +52,7 @@ TEST(GrisuTest, Prettify) {
EXPECT_EQ("12.34", fmt::format("{}", 1234e-2));
EXPECT_EQ("0.001234", fmt::format("{}", 1234e-6));
}
TEST(GrisuTest, ZeroPrecision) {
EXPECT_EQ("1", fmt::format("{:.0}", 1.0));
}