65 Commits

Author SHA1 Message Date
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
Leo Balter
bcb6c33387 Regenerate tests 2019-08-14 19:14:44 -04:00
Leo Balter
209845c7b5 Generate tests 2019-08-14 18:54:04 -04:00
Leo Balter
ae4df81f6f Generate tests 2019-08-14 17:52:41 -04:00
Leo Balter
4d06dbc7eb Generate tests 2019-08-14 16:48:44 -04:00
Leo Balter
c4dd26bcee Generate tests 2019-08-05 10:56:24 -04:00
Leo Balter
ca9a3fde50 Generate tests 2019-08-05 10:56:24 -04:00
Leo Balter
8893f7a684 Generate tests 2019-08-05 10:55:32 -04:00
Leo Balter
ddfe24afe3 Regenerate tests 2019-08-05 10:54:37 -04:00
Ross Kirsling
1859ec66f4 Test update for letting all early errors be SyntaxErrors 2019-06-12 14:09:03 -04:00
Leo Balter
d73548b027 Generate tests 2018-12-21 15:47:01 -05:00
Leo Balter
dec4e5df74
Merge pull request #1801 from mathiasbynens/issue-1634
Move `throw "…"` for negative parsing errors to a helper function
2018-11-13 17:23:09 -05:00
Rick Waldron
f1e362d558 Fix typos; generate tests (#1907) 2018-10-26 17:11:05 -04: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
Thomas Wood
2d4ac25fa0 Add feature flags for new.target
Additionally removed the `arrow-function` feature for
test/language/eval-code/direct/new.target-fn.js as it is not testing
arrow-functions, but they are mentioned in the preamble.
2018-07-24 20:31:35 +01:00
André Bargull
f3911d7ae4 Update remaining tests to use 'parse' instead of 'early' error phase 2018-01-25 13:59:37 -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
025b44f38c Refactor AssignmentExpression tests for parsers
A number of tests for the parsing of the AssignmentExpression production
were expressed using `eval`. This made the tests more complex than
necessary, and also prevented the tests from providing value to
ECMAScript parsers.

Remove the use of `eval` in the relevant tests and instead express the
expectations with literal source text. Remove superfluous "onlyStrict"
restriction from tests by declaring the probe binding prior to
assignment.
2017-12-10 15:59:11 -05:00
Caio Lima
d41eb5d913 Added test case to consider rest ordering (#1242) 2017-09-26 17:02:42 -04:00
André Bargull
87e259c6e5 Add replacement tests for destructuring evaluation order with property reference as target 2017-09-16 17:00:56 +02:00
André Bargull
58111fff7b Regenerate tests 2017-09-16 17:00:55 +02:00
Leo Balter
7630235d5d Re-generate tests 2017-09-08 10:13:36 -04:00
Leo Balter
9376782c6e Regenerate tests 2017-09-07 15:51:13 -04:00
Leo Balter
1624816d81 Re-Generate tests 2017-08-18 18:16:55 -04:00
Rick Waldron
38150b3535 Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 15:49:02 -04: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
Caio Lima
8f5afc2915 Generated tests for computed property Object rest destructuring 2017-05-22 23:05:35 -03:00
André Bargull
4494db10b7 Rename and update assignment early error tests 2017-05-02 12:09:25 -07:00
Leo Balter
d93e15662f
Generate Tests 2017-04-25 15:56:28 -04:00
Mike Pennisi
2c0c3e7f96 Correct typo in copyright information 2017-04-18 12:23:22 -04:00
André Bargull
d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Leo Balter
2adebecbfa
Generate tests 2017-03-27 13:21:14 -04:00
Leonardo Balter
92ac53f210
Generate tests 2017-03-20 14:50:53 -04:00
Leonardo Balter
368d483490
Generate tests 2017-03-14 17:42:04 -04:00
Leonardo Balter
0cc55bb44d
Generate tests 2017-03-06 16:25:14 -05:00
Mike Pennisi
cdc62ce0fa Re-generate tests 2016-10-19 15:24:20 -04:00
Mike Pennisi
d5a3a962b2 Reformat negative ReferenceError tests 2016-10-19 15:24:18 -04:00
jugglinmike
2bfaa0d895 Improve coverage for class "name" inference (#718)
* Extend tests for class "name" inference

Ensure that when a class defines a static "name" method, that method
definition prevents the "name" inference behavior.

* Re-generate tests
2016-07-08 18:37:04 -07:00
jugglinmike
ab4ff914fb Add tests for assignment target validation of new ES2015 forms (#693)
This re-factors some existing Sputnik tests to be more targeted and to use a
pattern that can be generalized to other forms. We could test these all day,
but I've limited myself to forms introduced in ES2015, specifically
YieldExpression and new.target. Note that SpiderMonkey incorrectly throws a
SyntaxError for these.
I thoughtlessly wrote ReferenceError tests for yield = 1 until I realized
that such productions are not actually recognized by the grammar, so the early
errors do not apply. Instead, I've added a negative syntax test for that case.

* Refactor test for valid cover

* Add tests for ValidSimpleAssignmentTarget

Ensure that constructs introduced in ES2015 are disallowed as assignment
targets, with or without a "cover" grammar.

* Add test for grammar precedence of YieldExpression
2016-07-05 15:20:56 -07:00
Mike Pennisi
88879de735 Generate tests 2016-05-25 17:29:27 -04:00
Mike Pennisi
c24a206511 Re-format destructuring assignment tests
Utilize the test generation tool to increase coverage of destructuring
assignment semantics. Previously, only destructuring assignment in the
AssignmentExpression position was tested. With this change applied, the
same tests will assert expected behavior for destructuring assignment in
`for..of` statements, as well.

A limited number of tests are applied to the `for..in` statement as
well, but due to the iteration protocol observed by that statement, many
destructuring tests are not relevant, and others cannot be automatically
generated from this format.
2016-05-25 13:47:06 -04:00
jugglinmike
c6a152558d Add tests for Annex B extn: __proto__ in obj init (#633) 2016-05-19 13:01:07 -04:00
Mike Pennisi
eb644bb2da Reduce reliance on fnGlobalObject.js
This harness function is not necessary in the majority of cases in which
it is used. Remove its usage to simplify tests and decrease the amount
of domain-specific knowledge necessary to contribute to the test suite.

Persist the harness function itself for use by future tests for ES2015
modules (such a helper is necessary for tests that are interpreted as
module code).
2016-04-25 11:09:21 -07:00
jugglinmike
26676beab5 Add tests for IteratorClose in dstr assignment (#524)
The files in this patch are organized according to the following naming
scheme:

Prefix             | Grammar production
-------------------|-------------------
`array-empty-`     | ArrayAssignmentPattern : [ ]
`array-elision-`   | ArrayAssignmentPattern : [ Elision ]
`array-rest-`      | ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
`array-elem-`      | ArrayAssignmentPattern : [ AssignmentElementList ]
`array-elem-trlg-` | ArrayAssignmentPattern : [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]

Suffix             | Intent
-------------------|-------
`-abpt-close-err`  | The assignment evaluation returns an abrupt completion, and the iterator's `return` method throws an error
`-abpt-close-skip` | The assignment evaluation returns an abrupt completion, but IteratorClose is not invoked
`-abpt-close`      | The assignment evaluation returns an abrupt completion, and IteratorClose is invoked as specified
`-get-err`         | Abrupt completion returned from GetIterator
`-nrml-close-err`  | The assignment evaluation completes, and the iterator's `return` method throws an error
`-nrml-close-null` | The assignment evaluation completes, and the iterator's `return` method returns a non-Object value (there is no corresponding `-abpt-` suffix because the algorithm does not reference the return value in those cases)
`-nrml-close-skip` | The assignment evaluation completes, but IteratorClose is not invoked
`-nrml-close`      | The assignment evaluation completes, and IteratorClose is invoked as specified

Not all suffixes are appropriate for all productions. Suffixes have been
simplified in cases where less specificity is necessary to disambiguate
test cases.
2016-04-18 14:33:21 -04:00
André Bargull
73d5292b77 Replace runTestCase with assert helpers [test/language/expressions] 2015-08-13 17:34:17 +02:00
André Bargull
3de484fe83 Replace runTestCase with assert.throws [test/language/expressions] 2015-08-11 17:42:41 +02:00
André Bargull
efabdf8474 Replace runTestCase with assert helpers [test/language/expressions/] 2015-08-06 18:32:15 +02:00