Commit Graph

8 Commits

Author SHA1 Message Date
Gokhan Kurt f5369c26a4 add async-functions feature to files which should have it 2022-10-17 11:21:23 +02: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
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
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
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