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

Specify and test that 0x is case-invariant in the Convert class #101876

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

Dubzer
Copy link
Contributor

@Dubzer Dubzer commented May 4, 2024

Hi!
I was confused by the comment, so decided to specify that method can accept 0x and 0X as a prefix for hex numbers

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 4, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label May 4, 2024
@Dubzer

This comment was marked as resolved.

@jkotas jkotas added area-System.Numerics and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 5, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

@danmoseley
Copy link
Member

Are there tests for all these already

@tannergooding
Copy link
Member

This is already covered in the official docs under the remarks section: https://learn.microsoft.com/en-us/dotnet/api/system.convert.tobyte?view=net-8.0#system-convert-tobyte(system-string-system-int32)

Are there tests for all these already

Looks like no, @Dubzer would you mind adding explicit coverage to the various Convert.To*.cs files, specifically under the FromStringWithBase tests in https://github.com/dotnet/runtime/blob/main/src/libraries/System.Runtime/tests/System.Runtime.Extensions.Tests/System ?

@Dubzer
Copy link
Contributor Author

Dubzer commented Jun 4, 2024

@tannergooding sure! I'll add it to my PR when I have time

@Dubzer Dubzer changed the title Specify that 0x is case-invariant in the Convert class Specify and test that 0x is case-invariant in the Convert class Jun 12, 2024
@Dubzer
Copy link
Contributor Author

Dubzer commented Jun 12, 2024

@tannergooding done! I've added tests and also fixed small comment typo for the ToString method

@tannergooding tannergooding merged commit 1a96940 into dotnet:main Jun 12, 2024
144 of 146 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Numerics community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants