Commit Graph

33 Commits

Author SHA1 Message Date
Linus Groh a82f5382ff Remove 'AsyncArrowFunction' test
There is no such hidden constructor, it's the same as the hidden
AsyncFunction constructor. In other words:

```js
Object.getPrototypeOf(async () => {}).constructor ===
Object.getPrototypeOf(async function () {}).constructor
```

Also add a test to ensure that %AsyncFunction.prototype% is indeed the
prototype of an async arrow function.

Closes #4044.
2024-07-04 11:03:23 +02:00
Gokhan Kurt f5369c26a4 add async-functions feature to files which should have it 2022-10-17 11:21:23 +02:00
jmdyck 11624af8d0
Update "info" field (#2941)
The quoted spec wording changed in ecma262#1694.
2021-01-28 16:03:01 -08:00
Rick Waldron b89c3bf369 Generate tests 2020-10-14 14:01:01 -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 9e71e2120a Generate tests 2020-10-05 10:53:43 -04:00
Rick Waldron 677ae94ae9 Generate tests 2020-09-25 15:54:49 -04:00
Rick Waldron 5090f7adfe Generate tests 2020-09-25 12:01:39 -04:00
Rick Waldron fd92897147 Generate tests 2020-09-22 10:37:38 -04:00
Valerie Young 55b28c166f Generate tests 2020-01-08 09:30:47 -08:00
Shu-yu Guo 68352eb8b5 Flag sloppy eval in parameter initializer tests as noStrict 2020-01-03 15:36:51 -08:00
Valerie Young 6281e227f5 generated test files 2019-12-23 13:33:25 -05:00
André Bargull 59a1a016b7 Assign "name" property to all anonymous functions (#2299)
Implements the changes from <https://github.com/tc39/ecma262/pull/1490>.
2019-08-15 10:58:40 -04:00
Richard Gibson c59db6e8bd Generate tests
SRC_DIR=src/function-forms ./make.py
2019-07-10 20:20:16 -04:00
jugglinmike 9fccd9852e Improve coverage for UniqueFormalParameters (#2043)
Previously, the early error prohibiting duplicate entries in
UniqueFormalParameters was only tested in terms of async functions. In
one case, this was misattributed to UniqeFormalParameters and only
enforced for strict mode code.

Extend coverage to the other function-creating productions which include
UniqueFormalParameters (i.e. method definitions and non-async arrow
functions), and update the existing tests to more accurately describe
the source of the error.
2019-01-23 14:07:19 -02:00
Mathias Bynens b9daa57dcb Rename to $DONOTEVALUATE per @leobalter's suggestion 2018-10-23 13:51:17 +02:00
Mathias Bynens e3feffb01e Move `throw "…"` for negative parsing errors to a helper function
Closes #1634.
2018-10-23 13:51:16 +02:00
Timothy Gu 140d922d4c Add async-functions feature to more files (#1830) 2018-10-05 10:37:21 -04:00
André Bargull b552dad5cb Various test cases for cross-browser compliance bugs 2018-05-03 09:27:27 -07:00
Adrian Heine 2fb8eca677 Fix typo intialize(r) -> initialize(r) 2018-02-12 10:05:52 -05:00
Mike Pennisi 136110378b Rename negative test "phase" for parsing
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.

Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.
2018-01-05 15:17:50 -05:00
Rick Waldron 92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Mike Pennisi ef76e548a4 Re-generate tests 2017-06-28 11:24:36 -04:00
Mike Pennisi 81d00def42 Force "early error" tests to fail if evaluated
This pattern makes expectations more explicit by making test files more
literal.
2017-06-28 11:24:36 -04:00
André Bargull e0c29310d9 Generate tests for yield and await as identifier 2017-05-02 12:09:33 -07:00
André Bargull 3d8fe2af4c Add tests for contextual keywords with escape sequences 2017-05-02 12:09:29 -07:00
Leo Balter d74f58cddd
Generate tests 2017-04-21 15:26:46 -04:00
Leo Balter 590d04edd2
Add info 2017-04-06 17:50:59 -04:00
Leo Balter 4941d46a28
Update cases for async fns with a line terminator 2017-04-06 16:06:42 -04:00
Shu-yu Guo 5038754462
Test for [no LineTerminator here] after 'async' for arrows and methods 2017-04-06 16:06:42 -04:00
Caitlin Potter 098f9ca3de Add tests for try/finally in async functions 2017-02-17 19:29:21 -05:00
Mike Pennisi 7d4b1d28ae Re-format tests for SyntaxErrors
Authored via the following command:

   $ find test -type f -print0 | \
       xargs -0 sed \
         -i 's/^\(\s*\)negative:\s*SyntaxError\s*$/\1negative:\n\1  phase: early\n\1  type: SyntaxError/g'
2016-10-19 15:24:21 -04:00
Brian Terlson dbf251586e Add tests for async functions
Closes #479
2016-07-28 15:11:28 -07:00