Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(856)

Unified Diff: test/cctest/test-parsing.cc

Issue 2661233002: [parser] Add more tests for preparser variable tracking. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 37b40e37ae3bb204d045b4531ff948c901cee7ad..161e1e75554e1182a0e1110d50043dd10b55dce1 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -8778,6 +8778,18 @@ TEST(NoPessimisticContextAllocation) {
{"", "var {my_var : a} = {my_var};", true},
{"", "let {my_var : a} = {my_var};", true},
{"", "const {my_var : a} = {my_var};", true},
+ {"", "var [a, b = my_var] = [1, 2];", true},
+ {"", "var [a, b = my_var] = [1, 2]; my_var;", true},
+ {"", "let [a, b = my_var] = [1, 2];", true},
+ {"", "let [a, b = my_var] = [1, 2]; my_var;", true},
+ {"", "const [a, b = my_var] = [1, 2];", true},
+ {"", "const [a, b = my_var] = [1, 2]; my_var;", true},
+ {"", "var {a = my_var} = {}", true},
+ {"", "var {a: b = my_var} = {}", true},
+ {"", "let {a = my_var} = {}", true},
+ {"", "let {a: b = my_var} = {}", true},
+ {"", "const {a = my_var} = {}", true},
+ {"", "const {a: b = my_var} = {}", true},
{"a = my_var", "", true},
{"", "function inner2(a = my_var) { }", true},
{"", "(a = my_var) => { }", true},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698