Temporal: Add tests for duration rounding edge case near +24h UTC shift#5044
Draft
ptomato wants to merge 1 commit into
Draft
Temporal: Add tests for duration rounding edge case near +24h UTC shift#5044ptomato wants to merge 1 commit into
ptomato wants to merge 1 commit into
Conversation
Contributor
Author
|
Don't merge this yet. These tests currently hit an assertion failure in the spec. We need to decide what to do with it. |
4b69c3a to
d677f36
Compare
This edge case was discovered thanks to Firefox fuzzing: https://bugzilla.mozilla.org/show_bug.cgi?id=2029455 There are two different tests, one for the bounding window being collapsed by the +24h shift when rounding calendar units, and one for being unable to find the day boundaries when rounding time units. The latter does not apply to total() since it doesn't go through NudgeToZonedTime. See tc39/proposal-temporal#3310 LLM disclosure: I used a bot to make a first draft of these, then hand-edited them until I was satisfied.
Contributor
Author
|
Just updated this with more test cases. |
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.
This edge case was discovered thanks to Firefox fuzzing: https://bugzilla.mozilla.org/show_bug.cgi?id=2029455
See tc39/proposal-temporal#3310
LLM disclosure: I used a bot to make a first draft of these, then hand-edited them until I was satisfied.