Re-format destructuring assignment tests #651
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 aswell, 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.
This may be surprising, but extending coverage in this way actually caches more
bugs in real engines!
A recent build of SpiderMonkey has this pass rate for the destructuring
assignment tests in
master
right now:...but that is limited to usage from the AssignmentExpression production.
This patch uses the test generation tool to create equivalent tests for
destructuring assignment from the head of a
for-of
statement. SpiderMonkeyhas the following pass rate for those tests: