Interpret precision as display width#4443
Merged
vitaut merged 10 commits intofmtlib:masterfrom May 25, 2025
Merged
Conversation
vitaut
requested changes
May 11, 2025
Contributor
vitaut
left a comment
There was a problem hiding this comment.
Thanks for the PR! Please address inline comments and add a test case to format-test.cc
Contributor
Author
Added the test case for introduced function dd25ea9. |
vitaut
reviewed
May 24, 2025
test/format-test.cc
Outdated
Comment on lines
+214
to
+216
| EXPECT_EQ( | ||
| fmt::detail::count_code_points_with_display_width_precision("🐱🐱🐱", 5), | ||
| 2); |
Contributor
There was a problem hiding this comment.
Let's test the output of fmt::format instead of this internal function to make sure that precision computation works end-to-end.
Contributor
Author
There was a problem hiding this comment.
It is done as part of 93fabd0
Thank you!
…st internal function
Contributor
|
Merged, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4272
It now correctly considers precision as display width precision.
Please let me know, if I need to add any test cases as well.
Thanks!