614 Commits

Author SHA1 Message Date
Kevin Gibbons
746197355c
Implement changes for "avoid mostly-redundant await in async yield*" (#3619) 2022-09-06 13:21:50 +02:00
legendecas
ee521159d5 Fix decorator tests 2022-06-23 15:17:43 -04:00
Youssef Soliman
79c4496559 Fixed spelling error identifer -> identifier. 2022-06-21 10:14:17 +02:00
Mike Pennisi
74de3d1d32 Correct spurious syntax errors
Prior to this commit, two tests for specific early errors also included
syntactically invalid `const` declarations. Implementations which
produced the expected syntax error due to these invalid declarations
would pass the tests regardless of whether they produced the early
errors that the tests were written to verify.

Correct the `const` declarations so that the tests verify the parsing
rule that they were designed to verify.
2022-06-17 10:29:52 +02:00
Dmitriy Kubyshkin
ba5529d926
Fix wrong error for a lexical redeclaration test (#3575)
The test as originally specified fails in all compatible parsers, but for the wrong reason. Below is an excerpt from V8, but all parser I tested behave the same:

```js
for (const x; false; ) {
           ^
SyntaxError: Missing initializer in const declaration
```

After the change the error is the assumed:

```js
  var x;
      ^
SyntaxError: Identifier 'x' has already been declared
```
2022-06-16 22:24:51 -04:00
Huáng Jùnliàng
79e3bc5176
add noStrict flag to yield-as-binding-id cases (#3551) 2022-06-09 09:01:21 +02:00
legendecas
6f8e0f67ca Decorators: add initial tests on class 2022-05-18 09:49:49 -04:00
Keith Miller
b409843612 Update S12.6.4_A7_T2.js
This test currently has some tabs. Clean this up and make them spaces instead.
2022-05-05 10:19:37 -07:00
rwaldron
f60d7cf67d fixup! Fix false negative in for-in test 2022-04-05 11:18:45 -04:00
rwaldron
384a4e1368 Fix false negative in for-in test
As originally written, this test would spuriously pass when the deleted
property was incorrectly visited by enumation but correctly removed from
the object. In such cases, the accumulator string would take the form

    "aa1baundefinedca3"

And satisfy all conditions intended to highlight implementation errors.

Refactor the test to avoid false negative by using an object with a null
prototype and verifying the exact contents of the accumulator string.
2022-04-05 11:18:10 -04:00
Mike Pennisi
3c88e9b619 Fix false negative in for-in test
As originally written, this test would spuriously pass when the deleted
property was incorrectly visited by enumation but correctly removed from
the object. In such cases, the accumulator string would take the form

    "aa1baundefinedca3"

And satisfy all conditions intended to highlight implementation errors.

Refactor the test to avoid false negative by using an object with a null
prototype and verifying the exact contents of the accumulator string.
2022-04-05 11:15:21 -04:00
Rick Waldron
8b4382d2f2
Transform compareArray -> assert.compareArray: test/language/**/*.js (#3239) 2021-10-15 20:35:01 -04:00
Mike Pennisi
8d420cef41 Remove unused functions 2021-10-13 14:18:32 -04:00
Rick Waldron
7be8fca485
fix: re-run clean and build on master to sync generated tests (#3247) 2021-10-06 15:47:46 -04:00
Mike Pennisi
8f1fb5c257 Remove unused functions 2021-10-05 16:24:16 -04:00
Mike Pennisi
a6834093aa Improve coverage by invoking functions as intended
Some tests which include function declarations designed to verify
behavior do not reference those functions. Insert the references
necessary for those functions to serve their intended purpose.
2021-10-05 16:22:56 -04:00
rwaldron
43c68163c0 Generate tests 2021-10-01 16:38:56 -04:00
Mike Pennisi
d9ddf80479 Revert "Merge pull request #3219 from tc39/rwaldron/migrate-comparearray"
This reverts commit b690cb67be9b487eb10156c03e2c00869e88cc9d, reversing
changes made to 50dd431dffe5cf86e9064a652d6b01dbbe542cf0. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
2021-10-01 10:18:47 -04:00
rwaldron
4847d9db5a chore: update test/**/*.js to use assert.compareArray wherever applicable 2021-09-24 12:58:15 -04:00
Mike Pennisi
650e7add4a Improve coverage for ops involving negative zero
Prior to this commit, the modified tests used the strict equality
operator to compare computed values with negative zero. Due to the
semantics of that operator, these tests would spuriously pass if the
value under test was in fact positive zero.

Update the tests to be more precise by instead asserting equality with
the `assert.sameValue` utility method (since that method correctly
distinguishes between negative zero and positive zero).
2021-09-16 16:35:41 -04:00
Mike Pennisi
2a898fe819 Add test for normative change to BlockStatement
Normative: continue labels should not pass through blocks
https://github.com/tc39/ecma262/pull/2482
2021-09-07 17:50:02 -04:00
André Bargull
47be34cef7 Split files which test for the property order of functions
So SpiderMonkey can run the other parts of these tests.
2021-08-05 18:23:52 -04:00
André Bargull
d00039593d Add various private field and private method tests
This adds tests for implementation bugs in SpiderMonkey [1], plus
additional tests for implementation bugs in V8 and JSC.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1723155
2021-08-04 15:06:38 -04:00
André Bargull
b74b15c49c
Derived class constructor checks are executed after leaving the function body (#3129) 2021-08-04 09:58:24 -07:00
rwaldron
4a125f2f4e chore: migrate $ERROR -> throw new Test262Error in test/language/s* 2021-07-29 10:38:53 -04:00
rwaldron
77cc528526 Generate tests 2021-07-22 15:31:36 -04:00
Timothy Gu
6319cb1e2a Add more static class property ordering tests
Since https://github.com/tc39/ecma262/pull/1490, the "length" and "name"
properties of a class are defined before any static methods. This is
tested by #2057, in test/language/computed-property-names of all places.

At the same time, static methods with "name" as the name would overwrite
the original property, but retain the original property enumeration
order. This was not previously tested. In fact, the overwriting behavior
was not tested at all for the "length" property.

This commit mends both holes in test coverage.
2021-07-16 09:27:16 -04:00
jugglinmike
afe217b318
Add tests for "Class Static Init. Blocks" proposal (#2968)
* Add tests for "Class Static Init. Blocks" proposal

This proposal is currently at "stage 3" in TC39's standardization
process.

* fixup! Add tests for "Class Static Init. Blocks" proposal

* Correct identifier reference

* Update tests for grammar

* Update tests for identifiers

* Add tests for scope derivation
2021-07-15 08:49:12 -04:00
Stuart Cook
9da1d6119c
Add more tests for for (async of edge-cases (#2983) 2021-05-07 16:16:34 -04:00
Stuart Cook
c11d6b00bc
Add a test for for await (async of (#2982) 2021-05-04 15:05:45 -04:00
Mike Pennisi
3addcc4b04 Generate tests 2021-04-20 09:53:57 -04:00
strager
6888a8df82
Fix typo in private getter/setter tests (#2971)
Several tests for getters and setters claim to check for an early
SyntaxError regarding mixing static and non-static propeties with the
same name. However, the tests trigger another issue: the getters have no
method body; they're missing curlies.

Fix the tests to test only the intended SyntaxError, not unrelated
SyntaxError-s.
2021-04-09 20:13:41 -04:00
Gus Caplan
516ca9af39 Update tests for ECMA262 #2216
https://github.com/tc39/ecma262/pull/2216
2021-02-26 11:49:49 -05:00
jmdyck
11624af8d0
Update "info" field (#2941)
The quoted spec wording changed in ecma262#1694.
2021-01-28 16:03:01 -08:00
Caio Lima
f81c2f5422 Adding test case for super access from class field defined as arrow function 2021-01-18 09:41:23 -05:00
Kevin Gibbons
96f1e2713b add tests for for ( async of 2021-01-18 09:40:36 -05:00
Rick Waldron
d8efa93bec Generate tests 2020-10-14 14:20:46 -04:00
Rick Waldron
bab4da88e3 Remove erroneous test templates and generated files 2020-10-14 14:20:46 -04:00
Rick Waldron
b89c3bf369 Generate tests 2020-10-14 14:01:01 -04:00
Caio Lima
72154b17fc Adding test cases to validate private field access with primitive receivers 2020-10-09 16:36:09 -04:00
Rick Waldron
a6d38ffe9a Correction: add explicit language re: application of Forbidden Extensions, bullet 1 2020-10-07 16:43:31 -04:00
Rick Waldron
6db0565b76 Generate tests 2020-10-05 10:53:43 -04:00
Rick Waldron
9e71e2120a Generate tests 2020-10-05 10:53:43 -04:00
Rick Waldron
f4ec59ad38 Generate tests 2020-09-30 11:51:44 -04:00
Rick Waldron
dc74a0b0ee Generate tests 2020-09-30 10:05:47 -04:00
Rick Waldron
348a706c5d Generate tests 2020-09-25 16:12:12 -04:00
Rick Waldron
677ae94ae9 Generate tests 2020-09-25 15:54:49 -04:00
Rick Waldron
21e97fb616 Generate tests 2020-09-25 14:42:12 -04:00
Rick Waldron
3f2a2aa464 Generate tests 2020-09-25 14:42:12 -04:00
Rick Waldron
cd778bea8c Generate tests 2020-09-25 13:30:10 -04:00