Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to format-test.cc #1498

Closed
planet36 opened this issue Dec 29, 2019 · 1 comment
Closed

Add tests to format-test.cc #1498

planet36 opened this issue Dec 29, 2019 · 1 comment

Comments

@planet36
Copy link

Both format("{:#.0f}", 0.01) and format("{:#.0f}", 0.5) should return "0." (like std::ostringstream does), but they return "0" and "0..", respectively

Please add some tests to test-format.cc like the following:

EXPECT_EQ("0.", format("{:#.0f}", 0.01));
EXPECT_EQ("0.", format("{:#.0f}", 0.5));
@vitaut
Copy link
Contributor

vitaut commented Dec 31, 2019

Good catch, thanks! Fixed and added tests in c85efef.

@vitaut vitaut closed this as completed Dec 31, 2019
sthagen added a commit to sthagen/fmtlib-fmt that referenced this issue Dec 31, 2019
More showpoint fixes and tests (fmtlib#1498)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants