Allow leading zeros in precision (#1579)

This commit is contained in:
Victor Zverovich committed 2020-03-14 11:37:38 -07:00
1 parent 678341275b
commit ff486a72a7
2 files changed
+6 -5

No files matched your search

+1
View File
@@ -1124,6 +1124,7 @@ TEST(FormatterTest, Precision) {
"000000000000000000000000000000000000000000000000000P+127",
format("{:.838A}", -2.14001164E+38));
EXPECT_EQ("123.", format("{:#.0f}", 123.0));
EXPECT_EQ("1.23", format("{:.02f}", 1.234));
EXPECT_THROW_MSG(format("{0:.2}", reinterpret_cast<void*>(0xcafe)),
format_error,