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

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

Issue 2661173003: [parser] Skipping inner funcs: add some more test cases which already pass. (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 cdec0a0aa1cf6beeb9280d5701112b2ca2cf7d0b..0faaf54ed8c4c1f95c85374aec840a85d51f1f77 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -9080,6 +9080,13 @@ TEST(PreParserScopeAnalysis) {
{"", "var var1; var var1; function f() { var1; }"},
{"", "var var1; var var1; function f() { var1 = 5; }"},
+ {"", "var var1; if (true) { var var1; }"},
+ {"", "var var1; if (true) { let var1; }"},
+ {"", "let var1; if (true) { let var1; }"},
+
+ {"", "var var1; if (true) { const var1 = 0; }"},
+ {"", "const var1 = 0; if (true) { const var1 = 0; }"},
+
{"", "arguments;"},
{"", "arguments = 5;"},
{"", "function f() { arguments; }"},
@@ -9134,6 +9141,27 @@ TEST(PreParserScopeAnalysis) {
{"",
"const {var1: var2, var3: {var4: var5}} = {var1: 1, var3: {var4: 2}};"},
{"", "const {var1: var2, var3: [var4, var5]} = {var1: 1, var3: [2, 3]};"},
+
+ {"", "inner;"},
+ {"", "function f1() { f1; }"},
+ {"", "function f1() { inner; }"},
+ {"", "function f1() { function f2() { f1; } }"},
+ {"", "function arguments() {}"},
+ {"", "function f1() {} function f1() {}"},
+ {"", "var f1; function f1() {}"},
+
+ {"", "inner = 3;"},
+ {"", "function f1() { f1 = 3; }"},
+ {"", "function f1() { f1; } f1 = 3;"},
+ {"", "function arguments() {} arguments = 8"},
+ {"", "function f1() {} f1 = 3; function f1() {}"},
+
+ {"", "var var1; eval('');"},
+ {"", "var var1; function f1() { eval(''); }"},
+ {"", "let var1; eval('');"},
+ {"", "let var1; function f1() { eval(''); }"},
+ {"", "const var1 = 10; eval('');"},
+ {"", "const var1 = 10; function f1() { eval(''); }"},
};
for (unsigned i = 0; i < arraysize(inners); ++i) {
« 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