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

Unified Diff: test/mjsunit/es8/syntactic-tail-call-parsing.js

Issue 1955393002: [es8] Throw SyntaxError when tail call expressions occur in non-strict mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « test/mjsunit/es8/syntactic-tail-call.js ('k') | test/mjsunit/es8/syntactic-tail-call-parsing-sloppy.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « test/mjsunit/es8/syntactic-tail-call.js ('k') | test/mjsunit/es8/syntactic-tail-call-parsing-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698