Commit Graph

373 Commits

Author SHA1 Message Date
Mike Pennisi f03c2c244c Procedurally generate related tests
Take advantage of a recent extension to the test generation tool in
order to limit duplication.
2017-03-04 12:17:35 -05:00
Mike Pennisi 228851fbe4
Add tests for accessor names 2017-03-01 11:38:10 -05:00
Mike Pennisi 7f6e6d137d [generation] Parse and render new error format
Extend the test generation tool to emit the recently-modified format of
the "negative" meta-data. Update the effected test case files
accordingly.
2016-10-19 15:24:19 -04:00
jugglinmike a41b71115b Annex b skip fib (#704)
* Re-generate tests

The test generation tool has been modified in the time since these tests
were first generated and committed to the project. Re-generate the tests
using the latest version of the tool.

* Add test cases for Annex B hoisting disqualifiers

The "variable-like" function hoisting semantics defined in Annex B
extension B.3.3 is only applied if "[...] replacing the
FunctionDeclaration f with a VariableStatement that has F as a
BindingIdentifier would not produce any Early Errors [...]". Test262
previously included tests for this condition when the disqualifying
early error originated from the ScriptBody and FunctionBody productions.

Add test cases to assert the behavior when it is disqualified by all
other relevant early errors: Block statements, `for` statements,
`for-of` statements, `for-in` statements, and Switch statements.

* Generate tests

* fixup! Add test cases for Annex B hoisting disqualifiers

* fixup! Add test cases for Annex B hoisting disqualifiers

Correct test case "info" meta-data.

* fixup! Add test cases for Annex B hoisting disqualifiers

Improve test bodies

* fixup! Generate tests
2016-07-11 16:37:42 -07: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 a3fffa754b Improve coverage for "super" keyword (#687)
* Improve test coverage for `super` keyword

Add tests for SuperCall and SuperProperty, organized together in the
`test/language/expressions/super/` directory. For SuperProperty, include
tests for usage from within Object initializers and class bodies because
a different set of semantics are observable from each context.
2016-06-29 16:45:19 -07:00
Mike Pennisi 71f9559f11
Add tests for default parameters 2016-06-21 12:22:47 -04:00
Mike Pennisi 744cb4d2c9
Add templates for destructuring with dflt params 2016-06-21 12:20:36 -04:00
Mike Pennisi 8c8397573c Add test cases for spread operator
The operand of the spread operator may be an AssignmentExpression. Add
test cases which demonstrate this.
2016-06-11 17:42:50 -04:00
Mike Pennisi 2658524163 Add test templates for spread in array initializer
Formulate templates for the SpreadElement in an array initializer in
order to conform to existing pattern.
2016-06-11 17:27:19 -04:00
Leo Balter 2cf968cfad Merge pull request #651 from bocoup/generation-dstr-assign
Re-format destructuring assignment tests
2016-06-01 14:00:09 -04:00
Leo Balter 1e75730d5f Merge pull request #587 from bocoup/generation-annexb-fns
Add tests for Annex B "function in block" semantics (procedurally generated)
2016-05-31 17:45:48 -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
Mike Pennisi b7d496942a Use distinct variable name within test case
In order to increase the clarity of generated output, select a name for
the test case variable that is not also used by a test template.
2016-05-19 15:06:13 -04:00
Mike Pennisi 95b5b13c16 Add test cases for the spread operator 2016-05-19 15:06:12 -04:00
Mike Pennisi c98b6ed4e6 Specify `esid` tag in test templates 2016-05-19 15:06:11 -04:00
Mike Pennisi cc7381d3b2 Add test cases for destructuring binding 2016-05-10 11:51:44 -04:00
Mike Pennisi be195c38ca Add omitted destructuring binding forms
Add test templates for destructuring binding as it occurs in
previously-overlooked productions (various IterationStatements and the
TryStatement).
2016-05-10 11:51:44 -04:00
Mike Pennisi 8c6b1320de Add assertion messages for function invocation 2016-05-10 11:51:44 -04:00
Mike Pennisi 0d09ea91d9 Add "features" tag to test templates 2016-05-10 11:51:32 -04:00
Mike Pennisi d5190e96df Specify `esid` tag in test templates 2016-05-10 11:39:22 -04:00
Mike Pennisi ad62d5b815 Add cases/templates for Annex B.3.3/B.3.4 2016-04-18 16:19:29 -04:00
Mike Pennisi 74bff6b3d5 Add initial set of generated test sources 2016-03-16 15:29:30 -04:00