Use grisu for exponent notation

This commit is contained in:
Victor Zverovich
2019-11-19 15:18:38 -08:00
parent e9bff78814
commit 66d7746bb3
2 changed files with 28 additions and 23 deletions

View File

@@ -1206,6 +1206,7 @@ TEST(FormatterTest, Precision) {
"precision not allowed for this argument type");
EXPECT_EQ("1.2", format("{0:.2}", 1.2345));
EXPECT_EQ("1.2", format("{0:.2}", 1.2345l));
EXPECT_EQ("1.2e+56", format("{:.2}", 1.234e56));
EXPECT_THROW_MSG(format("{0:.2}", reinterpret_cast<void*>(0xcafe)),
format_error,