Chromium Code Reviews| Index: test/cctest/test-parsing.cc |
| diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
| index 9faa0a40ea70d40ea96a7d216795a46bcf699e9d..65900225ac9974b0095fdc10a60ad7ea9c7836b1 100644 |
| --- a/test/cctest/test-parsing.cc |
| +++ b/test/cctest/test-parsing.cc |
| @@ -6345,6 +6345,25 @@ TEST(DestructuringPositiveTests) { |
| NULL}; |
| // clang-format on |
| RunParserSyncTest(context_data, data, kSuccess); |
| + |
| + // v8:5201 |
| + { |
| + const char* context_data[][2] = { |
| + {"", ""}, |
| + {NULL, NULL} |
| + }; |
| + |
| + const char* data[] = { |
| + "var {eval} = {}", |
| + "var {arguments} = {}", |
| + "'use strict'; var {eval: x} = {eval: 5};", |
| + "'use strict'; var {arguments: x} = {arguments: 5};", |
| + "(() => { function f({eval = false } = {}) {} })()", |
| + NULL, |
| + }; |
| + |
| + RunParserSyncTest(context_data, data, kSuccess); |
| + } |
| } |
| @@ -6469,6 +6488,8 @@ TEST(DestructuringNegativeTests) { |
| "{ a : arguments }", |
| "[public]", |
| "{ x : private }", |
| + "{eval}", |
| + "{arguments}", |
|
adamk
2016/08/17 19:32:51
Can you flesh out this test coverage while you're
lpy
2016/08/19 17:00:40
Done.
|
| NULL}; |
| // clang-format on |
| RunParserSyncTest(context_data, data, kError); |
| @@ -6872,6 +6893,25 @@ TEST(DestructuringAssignmentNegativeTests) { |
| NULL}; |
| RunParserSyncTest(strict_context_data, strict_data, kError); |
| + |
| + // v8:5201 |
|
adamk
2016/08/17 19:32:51
Isn't this block now redundant with the tests you
lpy
2016/08/19 17:00:40
Done.
|
| + { |
| + // clang-format off |
| + const char* context_data[][2] = { |
| + {"'use strict'; var {", "} = {};"}, |
| + {"(() => { 'use strict'; function a({", " = false } = {}) {} })()"}, |
| + {NULL, NULL} |
| + }; |
| + |
| + const char* data[] = { |
| + "eval", |
| + "arguments", |
| + NULL |
| + }; |
| + |
| + // clang-format on |
| + RunParserSyncTest(context_data, data, kError); |
| + } |
| } |