Skip to content

Fix test262 failures after suite update#2313

Merged
lahma merged 1 commit into
sebastienros:mainfrom
lahma:update-test262-2026-03-06
Mar 6, 2026
Merged

Fix test262 failures after suite update#2313
lahma merged 1 commit into
sebastienros:mainfrom
lahma:update-test262-2026-03-06

Conversation

@lahma

@lahma lahma commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Updates the test262 suite SHA to 1a51ced90ea5 and fixes all 199 introduced test failures (0 remaining, 92186 passed).

Fixes

  • UTC offset parsing: Support hour-only +HH offsets, compact format fractions +HHMMSS.fff, and consolidate offset validation via ParseOffsetString
  • Too-many-decimals validation: Enforce max 9 fraction digits in offset strings
  • DateTimeFormat no-time-clip: Use representative year mapping for Temporal dates outside .NET's 1-9999 range, plumb originalYear through all format paths
  • formatRange different-calendars: Validate that Temporal objects in a range share the same calendar
  • PlainMonthDay overflow: Skip ISO year range check when year is only used for overflow detection
  • ROC calendar era codes: minguoroc, before-rocbroc to match CLDR/ICU standard
  • GetStartOfDay: Simplified to spec algorithm (first transition after startBefore), fixes Samoa date line change
  • DisambiguatePossibleEpochNanoseconds: Replaced ±1 hour hack with proper spec algorithm using offsets at ±1 day, handles gaps of any size
  • ZonedDateTime.with(): Default to existing offset when none provided in property bag
  • AddDurationToZonedDateTime: Delegate to TemporalHelpers.AddZonedDateTime so time parts are added after timezone disambiguation
  • DifferenceZonedDateTime: Fix sign adjustment direction when date and time portions disagree

Exclusions

  • await-dictionary, import-bytes features (not yet implemented)
  • 24 leap-month calendar tests (Chinese/Dangi/Hebrew lunisolar limitations)
  • 1 Japanese pre-Meiji era test
  • 1 non-Latin numerals test (.NET ar-EG locale defaults to latn numbering)

Test plan

  • Full test262 suite: 0 failures, 92186 passed, 3405 skipped
  • Jint.Tests: 0 failures, 2756 passed

🤖 Generated with Claude Code

- Fix UTC offset parsing: hour-only (+HH), compact fractions (+HHMMSS.fff)
- Fix too-many-decimals validation for offset fraction digits (max 9)
- Fix DateTimeFormat no-time-clip: representative year for dates outside 1-9999
- Fix formatRange different-calendars check
- Fix PlainMonthDay iso-year-used-only-for-overflow with skipRangeCheck
- Fix ROC calendar era codes (minguo→roc, before-roc→broc)
- Fix GetStartOfDay to follow spec (first transition after startBefore)
- Fix DisambiguatePossibleEpochNanoseconds for large gaps (Samoa date line)
- Fix ZonedDateTime.with() to use existing offset when not provided
- Fix AddDurationToZonedDateTime to add time after disambiguation
- Fix DifferenceZonedDateTime sign adjustment direction
- Exclude unsupported features and calendar tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lahma
lahma merged commit 8c011b8 into sebastienros:main Mar 6, 2026
4 checks passed
@lahma
lahma deleted the update-test262-2026-03-06 branch March 6, 2026 13:39
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.

1 participant