Skip to content

Update to latest test262, minor reference code improvements #3104

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

Merged
merged 6 commits into from
May 2, 2025
Merged

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Apr 21, 2025

  • Update to latest test262
  • A few minor improvements
  • Fix bug in calendar code (not corresponding to any spec steps)

ptomato added 6 commits April 17, 2025 17:04
One implementation (in the Persian calendar) has the wrong name so never
got invoked.

Another implementation (Chinese/Dangi calendars) interpreted the
passed-in argument incorrectly. But it would eventually come up with the
right answer, after searching 20 years.
While going over this code I was very confused by this line. I've added
a comment to explain it.
This line would accidentally convert the BigInt epoch nanoseconds to
Numbers, potentially losing microseconds or nanoseconds, before
subtracting. It did not affect any results, because no offset
transitions occur on microsecond or nanosecond boundaries.
Instead of doing a multiplication here, we can just check if the
remainder is zero. This matters a bit more for TimeDuration and
RoundNumberToIncrementAsIfPositive, because we avoid a BigInt
multiplication.
Skip calculating isEven if we short-circuit ApplyUnsignedRoundingMode in
RoundNumberToIncrementAsIfPositive.
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.75%. Comparing base (fd7988d) to head (60ac451).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3104      +/-   ##
==========================================
+ Coverage   96.71%   96.75%   +0.03%     
==========================================
  Files          21       21              
  Lines        9951     9950       -1     
  Branches     1807     1812       +5     
==========================================
+ Hits         9624     9627       +3     
+ Misses        281      277       -4     
  Partials       46       46              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Ms2ger Ms2ger merged commit dc923b5 into main May 2, 2025
10 checks passed
@Ms2ger Ms2ger deleted the dev branch May 2, 2025 15:16
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