Limit percentage round-trip test to 100% maximum#419
Closed
nnabeyang wants to merge 1 commit intoservo:mainfrom
Closed
Limit percentage round-trip test to 100% maximum#419nnabeyang wants to merge 1 commit intoservo:mainfrom
nnabeyang wants to merge 1 commit intoservo:mainfrom
Conversation
emilio
reviewed
Nov 29, 2025
Member
emilio
left a comment
There was a problem hiding this comment.
I think it's worth keeping the test as is unless there's a strong reason not to?
| // Test simple number serialization | ||
| for i in 0..101 { | ||
| test_roundtrip(&format!("{}%", i)); | ||
| if i == 100 { |
Member
There was a problem hiding this comment.
I'm confused, is the test failing somehow? Why would we want to disable the test?
Contributor
Author
|
@emilio Thank you for reviewing. I reviewed again what this test is supposed to cover. I don’t see a good reason to add a conditional if i == 100 to restrict the loop to only 0–100%. Given your reasoning, I’m fine with the test remaining as is — please feel free to close this PR. |
Member
|
Sounds good, 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 the loop in roundtrip_percentage_token so that values above 100% (e.g. “100.1%”, “100.99%”) are no longer generated and tested.
It remains unclear whether the original intention was to cover only up to 100% or to include above-100% values; if the latter, the test coverage is insufficient and should be extended separately.