2133 Commits

Author SHA1 Message Date
Alexey Shvayka
e1e90abbe9 Test that detached buffer throws TypeError 2021-05-11 17:39:18 -04:00
Alexey Shvayka
88979b5b12 Align [[Value]] ToNumber tests with updated spec 2021-05-11 17:39:18 -04:00
Mike Pennisi
fd029d2d52 Increase precision of assertions for Error Cause
Minimize the code provided to the `assert.throws` utility in order to
reduce the possibility of false positives and to improve failure
messages in non-conforming runtimes.
2021-05-11 17:37:15 -04:00
Mike Pennisi
9b622bf093 Remove or relocate misleading tests
These tests were designed to test the built-in "Promise.race Resolve
Element function," but ECMA262 does not describe such a function.

Contrary to the test's description, the function under test is created
by the InstantiateArrowFunctionExpression abstract operation. The
following tests verify most of the details directly (only the function
object's extensibility was not already tested by the existing tests):

- test/language/expressions/arrow-function/name.js
- test/language/expressions/arrow-function/throw-new.js
- test/language/expressions/arrow-function/prototype-rules.js

The definition of the built-in resolving functions is closely related,
but Test262 already includes tests for the corresponding concerns:

- test/built-ins/Promise/resolve-function-extensible.js
- test/built-ins/Promise/resolve-function-name.js
- test/built-ins/Promise/resolve-function-nonconstructor.js
- test/built-ins/Promise/resolve-function-prototype.js

Remove the tests and introduce one additional test to preserve coverage
while improving discoverability.
2021-05-11 17:36:28 -04:00
Shu-yu Guo
70bc32edab
Give Error cause tests the error-cause feature tag (#2977) 2021-04-23 15:53:14 -07:00
legendecas
3e4e07c836
Add tests for stage 3 proposal error cause (#2965)
* Add tests for error cause

* Correct invocation of Proxy constructor

Co-authored-by: Mike Pennisi <mike@mikepennisi.com>
2021-04-23 14:45:27 -04:00
Alexey Shvayka
ce74c5f52d Test BigInt wrapper object 2021-04-20 09:58:16 -04:00
Alexey Shvayka
dcccc418b3 Test Symbol wrapper object 2021-04-20 09:58:16 -04:00
Rick Waldron
bd65623af6 Revert "Add valid index prototype chain [[Set]] tests"
This reverts commit cc18d5bb144a47994555d31e65f74e4936bfd1ee.
2021-04-20 09:56:22 -04:00
Rick Waldron
b90326d9a4 Revert "Add valid index Reflect.set tests"
This reverts commit 20cd505a9659b80d6c03c85ab27d95624a6a0055.
2021-04-20 09:56:22 -04:00
Rick Waldron
3d77404e4f Revert "Add invalid index prototype chain [[Set]] tests"
This reverts commit 477e6ddffec9f15b93e6596749eaf2e45f421065.
2021-04-20 09:56:22 -04:00
Rick Waldron
b110681292 Revert "Add invalid index Reflect.set tests"
This reverts commit a3aa19d2e20aff709f91c1414c6aa33a4fc37ef8.
2021-04-20 09:56:22 -04:00
Alexey Shvayka
a3aa19d2e2 Add invalid index Reflect.set tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka
477e6ddffe Add invalid index prototype chain [[Set]] tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka
20cd505a96 Add valid index Reflect.set tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka
cc18d5bb14 Add valid index prototype chain [[Set]] tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka
6e61dd7754
Test Array's toString() with non-callable "join" (#2973)
* Test Array's toString() with non-callable "join"

* Remove Array.prototype.join modifications
2021-04-15 20:51:08 -04:00
Alexey Shvayka
c00087e129 Test Array.prototype.sort called with a primitive 2021-03-02 16:33:02 -05:00
Gus Caplan
516ca9af39 Update tests for ECMA262 #2216
https://github.com/tc39/ecma262/pull/2216
2021-02-26 11:49:49 -05:00
Ron Buckton
0d922ddc97 Fix lint error 2021-02-25 11:03:39 -05:00
Ron Buckton
64ea2d19e6 rename no-indices-array test 2021-02-25 11:03:39 -05:00
Ron Buckton
d66f270313 PR Feedback 2021-02-25 11:03:39 -05:00
Ron Buckton
a567e4c819 Updates to regexp-match-indices tests based on d-flag 2021-02-25 11:03:39 -05:00
Alexey Shvayka
950d097516 Add Object.freeze test 2021-02-08 15:41:23 -05:00
Alexey Shvayka
a4ca510b55 Add Object.seal test 2021-02-08 15:41:23 -05:00
Alexey Shvayka
fd6bbbe581 Add Object.freeze tests 2021-02-08 15:40:48 -05:00
Alexey Shvayka
1fd4fb480c Add Object.seal tests 2021-02-08 15:40:48 -05:00
Alexey Shvayka
83ffa3d911 Add Object.preventExtensions tests 2021-02-08 15:40:48 -05:00
Yusuke Suzuki
93a2ba8c28 Fix BigInt TypedArrays tests
1. test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js
It is not updated when a60a67ea880bb4b5de849ee8f7676a475f60c85f is landed. This patch fixes it.

2. test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js
After detaching, BigInt64Array/BigUint64Array will produce undefined for indexed access. And
if `filter`'s callback says `true` for these results, we need to store `ToBigInt(undefined)`
to a newly resulted BigInt64Array/BigUint64Array and this will throw an error. But this test
assumed it does not throw. This patch fixed flag so that we do not throw that error while keeping
detached typed arrays tested.
2021-02-03 22:10:52 -05:00
ExE Boss
8f904d8cc8 Set function length and name in CreateBuiltinFunction 2021-01-29 09:45:20 -05:00
Mathias Bynens
79060efc7f Add tests for accessors setting their successor 2021-01-27 09:23:28 -05:00
Mathias Bynens
e610e75985 Add tests for accessors setting precedessors 2021-01-27 09:23:28 -05:00
Mathias Bynens
80c18c0ea8 Add tests for accessors popping elements 2021-01-27 09:23:28 -05:00
Mathias Bynens
7733d900b2 Add tests for accessors increasing length 2021-01-27 09:23:28 -05:00
Mathias Bynens
b7da7c75ce Rename tests 2021-01-27 09:23:28 -05:00
Mathias Bynens
82f634d7fc Add tests for more precise Array#sort
https://github.com/tc39/ecma262/pull/1585
2021-01-27 09:23:28 -05:00
Oskari Noppa
a840b0d093 Shorten a very long filename
A quite popular solution for encrypting files on Linux,
[eCryptfs](https://wiki.archlinux.org/index.php/ECryptfs), can't handle
filenames longer than 143 characters when filename encryption is enabled. It
just so happens that the name of this file was 144 characters long, which makes
pulling the repository to an encrypted folder fail.
2021-01-19 09:06:30 -05:00
Shu-yu Guo
9ca13b1272 Fix typo in BigIntArray property descriptor test 2020-12-30 16:53:29 -05:00
Rick Waldron
de091de9f6 Include indexOf(undefined, ...) and lastIndexOf(undefined, ...) 2020-12-16 11:59:56 -05:00
Rick Waldron
167e596a64 Align detached buffer semantics with web reality, R6. Fixes gh-2915 2020-12-16 11:59:56 -05:00
Tom Schuster
734c867ac3 Remove test code between license and front matter
The script that we use for updating SpiderMonkey's copy of test262 doesn't like this.
@rwaldron r?
2020-12-10 09:20:36 -05:00
Sébastien Ros
7376666039 Typo 2020-12-10 09:19:33 -05:00
Vlad
c1959a44a6 Math.max/min - each element coerced 2020-12-10 09:19:02 -05:00
Rick Waldron
3b425c6da3 Coverage: missing tests for Array.prototype.reverse method. Fixes gh-2902 2020-12-02 16:34:44 -05:00
Rick Waldron
96aff62fb2 IntegerIndexedElementSet should always indicate success. Ref: tc39/ecma262/pull/2210 2020-12-02 15:06:36 -05:00
Ross Kirsling
73798cbc61
Fix typos for at/prop-desc tests. (#2908) 2020-11-19 02:32:38 -08:00
Leo Balter
2e5ff2461b fixup! Fix missing renames for item->at 2020-11-18 15:18:14 -05:00
Leo Balter
65bd4432f9 Fix missing renames for item->at
Ref #2905
2020-11-18 15:18:14 -05:00
Ross Kirsling
df1bce9c2e Rename item() to at(). 2020-11-18 13:31:11 -05:00
Yusuke Suzuki
36d2d2d348 Fix test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/index-prop-desc.js's value
Since the 0's value is 43, 43 should be populated in a descriptor.
2020-11-13 08:57:15 -05:00