Skip to content

Conversation

@nnabeyang
Copy link
Contributor

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.

Copy link
Member

@emilio emilio left a comment

Choose a reason for hiding this comment

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

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 {
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused, is the test failing somehow? Why would we want to disable the test?

@nnabeyang
Copy link
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.

@emilio
Copy link
Member

emilio commented Nov 29, 2025

Sounds good, thanks!

@emilio emilio closed this Nov 29, 2025
@nnabeyang nnabeyang deleted the fix/limit-percentage-test-to-100 branch November 29, 2025 12:22
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

Successfully merging this pull request may close these issues.

2 participants