Index: test/mjsunit/es8/syntactic-tail-call-parsing.js |
diff --git a/test/mjsunit/es8/syntactic-tail-call-parsing.js b/test/mjsunit/es8/syntactic-tail-call-parsing.js |
index 818e2b0b00633aeef7225383314f906ce7447ab2..9c4cbb8c46585079cd33a580513f8b9ae9114f3d 100644 |
--- a/test/mjsunit/es8/syntactic-tail-call-parsing.js |
+++ b/test/mjsunit/es8/syntactic-tail-call-parsing.js |
@@ -4,6 +4,7 @@ |
// Flags: --allow-natives-syntax --harmony-explicit-tailcalls |
// Flags: --harmony-do-expressions |
+"use strict"; |
var SyntaxErrorTests = [ |
{ msg: "Unexpected expression inside tail call", |
@@ -222,17 +223,14 @@ var SyntaxErrorTests = [ |
{ src: `()=>{ switch (continue foo()) { case 1: break; } ; }`, |
err: ` ^^^^^^^^^^^^^^`, |
}, |
- { src: `()=>{ with (continue foo()) { smth; } }`, |
- err: ` ^^^^^^^^^^^^^^`, |
- }, |
{ src: `()=>{ let x = continue foo() }`, |
err: ` ^^^^^^^^^^^^^^`, |
}, |
{ src: `()=>{ const c = continue foo() }`, |
err: ` ^^^^^^^^^^^^^^^`, |
}, |
- { src: `class A {}; class B extends A { constructor() { return continue super () ; } }`, |
- err: ` ^^^^^^^^^^^^^^^^^`, |
+ { src: `class A {}; class B extends A { constructor() { return continue foo () ; } }`, |
+ err: ` ^^^^^^^^^^^^^^^`, |
}, |
{ src: `class A extends continue f () {}; }`, |
err: ` ^^^^^^^^^^^^^`, |
@@ -312,13 +310,13 @@ var NoErrorTests = [ |
(function() { |
- for (test_set of SyntaxErrorTests) { |
+ for (var test_set of SyntaxErrorTests) { |
var expected_message = "SyntaxError: " + test_set.msg; |
- for (test of test_set.tests) { |
+ for (var test of test_set.tests) { |
var passed = true; |
var e = null; |
try { |
- Realm.eval(0, test.src); |
+ eval(test.src); |
} catch (ee) { |
e = ee; |
} |
@@ -359,9 +357,10 @@ var NoErrorTests = [ |
(function() { |
- for (src of NoErrorTests) { |
+ for (var src of NoErrorTests) { |
print("======================================="); |
print("Source | " + src); |
+ src = `"use strict"; ` + src; |
Realm.eval(0, src); |
print("PASSED"); |
print(); |