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

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

Issue 2659053002: [parser] Skipping inner funcs: make basic variable declarations work. (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 | « src/ast/scopes.cc ('k') | 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 5da71c7255076138aab037280ca2911e92d26ad8..784212c08cb9d07225aa45a21162e00c8ab02273 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -9042,9 +9042,30 @@ TEST(PreParserScopeAnalysis) {
const char* params;
const char* source;
} inners[] = {
- {"", "var1"},
+ {"", "var1;"},
+ {"", "var1 = 5;"},
{"", "if (true) {}"},
{"", "function f1() {}"},
+
+ {"", "var var1;"},
+ {"", "var var1; var1 = 5;"},
+ {"", "if (true) { var var1; }"},
+ {"", "if (true) { var var1; var1 = 5; }"},
+ {"", "var var1; function f() { var1; }"},
+ {"", "var var1; var1 = 5; function f() { var1; }"},
+ {"", "var var1; function f() { var1 = 5; }"},
+
+ {"", "let var1;"},
+ {"", "let var1; var1 = 5;"},
+ {"", "if (true) { let var1; }"},
+ {"", "if (true) { let var1; var1 = 5; }"},
+ {"", "let var1; function f() { var1; }"},
+ {"", "let var1; var1 = 5; function f() { var1; }"},
+ {"", "let var1; function f() { var1 = 5; }"},
+
+ {"", "const var1 = 5;"},
+ {"", "if (true) { const var1 = 5; }"},
+ {"", "const var1 = 5; function f() { var1; }"},
};
for (unsigned i = 0; i < arraysize(inners); ++i) {
« no previous file with comments | « src/ast/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698