Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 5a7809c5862a0aefde1ab7ae76360306b63fc550..9be4ef0dda8237ec442b89411c9e441d4fe9b5ad 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -9258,12 +9258,22 @@ TEST(PreParserScopeAnalysis) { |
{"", "var var1; if (true) { const var1 = 0; }"}, |
{"", "const var1 = 0; if (true) { const var1 = 0; }"}, |
- // Variable called "arguments" |
+ // Arguments and this. |
{"", "arguments;"}, |
{"", "arguments = 5;"}, |
+ {"", "if (true) { arguments; }"}, |
+ {"", "if (true) { arguments = 5; }"}, |
{"", "function f() { arguments; }"}, |
{"", "function f() { arguments = 5; }"}, |
+ {"", "this;"}, |
+ {"", "this = 5;"}, |
+ {"", "if (true) { this; }"}, |
+ {"", "if (true) { this = 5; }"}, |
+ {"", "function f() { this; }"}, |
+ {"", "function f() { this = 5; }"}, |
+ |
+ // Variable called "arguments" |
{"", "var arguments;"}, |
{"", "var arguments; arguments = 5;"}, |
{"", "if (true) { var arguments; }"}, |
@@ -9435,9 +9445,6 @@ TEST(PreParserScopeAnalysis) { |
{"", |
"var var1 = 0; for (var1; var1 > 2; ) { function foo() { var1 = 6; } }"}, |
- // FIXME(marja): Add test cases for special variables (this, arguments |
marja
2017/02/07 08:23:16
This was a red herring; turns out this expressions
vogelheim
2017/02/07 08:33:47
Acknowledged.
|
- // etc) referred to in the for loop conditions. |
- |
// Sloppy block functions. |
{"", "if (true) { function f1() {} }"}, |
{"", "if (true) { function f1() {} function f1() {} }"}, |