Skip to content
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

Fix 2 bugs that stopped test262 #812

Merged
merged 3 commits into from
Oct 8, 2020
Merged

Conversation

RageKnify
Copy link
Contributor

@RageKnify RageKnify commented Oct 7, 2020

This Pull Request fixes the failure of test262 in CI by adding a check in Array.prototype.map and correcting Array.prototype.reduceRight for length 1.

It changes the following:

  • Array.prototype.map now throws a RangeError if the length of the received object is greater than 2^32 - 1, as per the spec.
  • Array.prototype.reduceRight now works correctly for length 1.

@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #812 into master will increase coverage by 0.00%.
The diff coverage is 88.88%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #812   +/-   ##
=======================================
  Coverage   59.67%   59.68%           
=======================================
  Files         157      157           
  Lines       10052    10054    +2     
=======================================
+ Hits         5999     6001    +2     
  Misses       4053     4053           
Impacted Files Coverage Δ
boa/src/builtins/array/mod.rs 73.72% <88.88%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a77ceb6...7bf0ace. Read the comment docs.

@RageKnify
Copy link
Contributor Author

There are other problems, working on them.

@RageKnify RageKnify requested a review from Razican October 7, 2020 21:43
@RageKnify RageKnify changed the title Fix: Add check for length in Array.prototype.map Fix 2 bugs that stopped test262 Oct 7, 2020
@RageKnify RageKnify added this to the v0.11.0 milestone Oct 7, 2020
@RageKnify RageKnify added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics labels Oct 7, 2020
@HalidOdat
Copy link
Member

HalidOdat commented Oct 7, 2020

On master it's 18.27%, Just checked the conformance of this branch:

2020-10-07T22:05:54.4837388Z Results:
2020-10-07T22:05:54.4837789Z Total tests: 38976
2020-10-07T22:05:54.4838209Z Passed tests: 8232
2020-10-07T22:05:54.4838671Z Conformance: 21.12%

Its 21.12% 🎉 from 7121 to 8232, that is another 1111 more passing tests (compared to master)

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Amazing, great work!

@Razican Razican merged commit 9d4c49c into boa-dev:master Oct 8, 2020
@RageKnify RageKnify deleted the fix/test262fail branch October 8, 2020 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants