diff options
author | Victor Zverovich <victor.zverovich@gmail.com> | 2019-11-24 08:22:18 -0800 |
---|---|---|
committer | Victor Zverovich <victor.zverovich@gmail.com> | 2019-11-24 08:23:10 -0800 |
commit | 28d7191c277eb679c0e7d6469de36755087afc3b (patch) | |
tree | 928e386894ac7e21420e475ea5532152011528d9 /test | |
parent | 43271ba8e8b1e3376ab4f49f3004cc6d7fb51f2c (diff) | |
download | fmtlib-28d7191c277eb679c0e7d6469de36755087afc3b.tar.gz |
Don't print trailing zero with fixed, precision=0, and showpoint (#1417)
Diffstat (limited to 'test')
-rw-r--r-- | test/format-test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/format-test.cc b/test/format-test.cc index e6095841..bce5539f 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1212,6 +1212,7 @@ TEST(FormatterTest, Precision) { "012970999954193198940908041656332452475714786901472678015935523861155013" "480352649347201937902681071074917033322268447533357208324319361e-324", format("{:.494}", 4.9406564584124654E-324)); + EXPECT_EQ("123.", format("{:#.0f}", 123.0)); EXPECT_THROW_MSG(format("{0:.2}", reinterpret_cast<void*>(0xcafe)), format_error, |