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

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

Issue 1164073003: [es6] super.prop, eval and lazy functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make the logger use 2 fields Created 5 years, 6 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/scopes.h ('k') | test/mjsunit/harmony/classes-lazy-parsing.js » ('j') | 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 5d9985c4d5cfb0ae6dffde27ef6bfea3893f67db..24cf67b4a16fec074530d8c2a067696e8cc8ed2a 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -976,6 +976,7 @@ TEST(ScopeUsesArgumentsSuperThis) {
SUPER_PROPERTY = 1 << 1,
THIS = 1 << 2,
INNER_ARGUMENTS = 1 << 3,
+ EVAL = 1 << 4
};
// clang-format off
@@ -1025,6 +1026,11 @@ TEST(ScopeUsesArgumentsSuperThis) {
" let x; return { m() { return this + super.m() + arguments } }"
"}",
NONE},
+ {"eval(42)", EVAL},
+ {"if (1) { eval(42) }", EVAL},
+ {"eval('super.x')", EVAL},
+ {"eval('this.x')", EVAL},
+ {"eval('arguments')", EVAL},
};
// clang-format on
@@ -1089,6 +1095,7 @@ TEST(ScopeUsesArgumentsSuperThis) {
}
CHECK_EQ((source_data[i].expected & INNER_ARGUMENTS) != 0,
scope->inner_uses_arguments());
+ CHECK_EQ((source_data[i].expected & EVAL) != 0, scope->calls_eval());
}
}
}
« no previous file with comments | « src/scopes.h ('k') | test/mjsunit/harmony/classes-lazy-parsing.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698