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

<format>: fix std::format("{:#.precision}", floating) #3815

Merged
merged 17 commits into from
Jun 22, 2023
Merged

<format>: fix std::format("{:#.precision}", floating) #3815

merged 17 commits into from
Jun 22, 2023

Conversation

achabense
Copy link
Contributor

@achabense achabense commented Jun 20, 2023

@achabense achabense requested a review from a team as a code owner June 20, 2023 12:53
assert(std::format("{:#.3}", 10.1) == "10.1");
assert(std::format("{:#.4}", 10.1) == "10.1");
assert(std::format("{:#.5}", 10.1) == "10.1");
}
Copy link
Contributor Author

@achabense achabense Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only none type is affected by this pr, so there are no checks for other format types('g','a','f',etc).

@StephanTLavavej StephanTLavavej added bug Something isn't working format C++20/23 format labels Jun 20, 2023
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej
Copy link
Member

I looked up the failing test names in the Azure Pipelines output, removed the corresponding lines from tests/libcxx/expected_results.txt, then validated that the directory and the newly added test are passing with:

python tests\utils\stl-lit\stl-lit.py %STL%\tests\std\tests\GH_003003_format_decimal_point %STL%\llvm-project\libcxx\test\std\utilities\format\format.functions --order=random -o testing_x64.log

@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej
Copy link
Member

Thank you for these significant runtime correctness fixes! 😻 🛠️ ✨

@StephanTLavavej
Copy link
Member

I'm speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 057adf2 into microsoft:main Jun 22, 2023
@StephanTLavavej
Copy link
Member

Thanks again for these fixes! 🚀 🚀 🚀

@achabense achabense deleted the _For_format branch June 23, 2023 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format C++20/23 format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<format>: Incorrect decimal point placement when using alternate form without a type
6 participants