From 3269aea2abe14df534fb063d920625c411ab8a5f Mon Sep 17 00:00:00 2001
From: Mike Pennisi <mike@mikepennisi.com>
Date: Fri, 30 Jun 2017 16:33:57 -0400
Subject: [PATCH] Remove faulty `throw` statements

The `throw` statements that were recently inserted into these tests have
an observable impact on the parsing behavior: they causes the `"use
strict"` token sequence to be interpreted as a string literal instead of
a directive prolog, which in turn effects how the tests are interpreted.

Remove the new `throw` statements from these tests and rely on
previously-existing statements that serve the same purpose without
impacting program strictness.
---
 lint.whitelist                                 | 5 +++++
 test/language/directive-prologue/10.1.1-2gs.js | 2 --
 test/language/directive-prologue/10.1.1-5gs.js | 2 --
 test/language/directive-prologue/10.1.1-8gs.js | 2 --
 test/language/directive-prologue/14.1-4gs.js   | 2 --
 test/language/directive-prologue/14.1-5gs.js   | 2 --
 6 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/lint.whitelist b/lint.whitelist
index 02101a6602..12608cc303 100644
--- a/lint.whitelist
+++ b/lint.whitelist
@@ -7,3 +7,8 @@
 # test/language/made-up-file.js FRONTMATTER LICENSE
 #
 # Note that lines prefixed with the "hash" symbol (#) will be ignored.
+test/language/directive-prologue/10.1.1-5gs.js NEGATIVE
+test/language/directive-prologue/10.1.1-2gs.js NEGATIVE
+test/language/directive-prologue/14.1-5gs.js NEGATIVE
+test/language/directive-prologue/14.1-4gs.js NEGATIVE
+test/language/directive-prologue/10.1.1-8gs.js NEGATIVE
diff --git a/test/language/directive-prologue/10.1.1-2gs.js b/test/language/directive-prologue/10.1.1-2gs.js
index b6a6ef26c3..c503c48619 100644
--- a/test/language/directive-prologue/10.1.1-2gs.js
+++ b/test/language/directive-prologue/10.1.1-2gs.js
@@ -12,8 +12,6 @@ negative:
 flags: [raw]
 ---*/
 
-throw "Test262: This statement should not be evaluated.";
-
 "use strict"
 throw new Error("This code should not execute");
 var public = 1;
diff --git a/test/language/directive-prologue/10.1.1-5gs.js b/test/language/directive-prologue/10.1.1-5gs.js
index 05e2ad87a8..d77ac7706c 100644
--- a/test/language/directive-prologue/10.1.1-5gs.js
+++ b/test/language/directive-prologue/10.1.1-5gs.js
@@ -12,8 +12,6 @@ negative:
 flags: [raw]
 ---*/
 
-throw "Test262: This statement should not be evaluated.";
-
 "use strict";
 throw new Error("This code should not execute");
 var public = 1;
diff --git a/test/language/directive-prologue/10.1.1-8gs.js b/test/language/directive-prologue/10.1.1-8gs.js
index ac8581c372..9a298adf02 100644
--- a/test/language/directive-prologue/10.1.1-8gs.js
+++ b/test/language/directive-prologue/10.1.1-8gs.js
@@ -12,8 +12,6 @@ negative:
 flags: [raw]
 ---*/
 
-throw "Test262: This statement should not be evaluated.";
-
 "use strict";
 "use strict";
 var public = 1;
diff --git a/test/language/directive-prologue/14.1-4gs.js b/test/language/directive-prologue/14.1-4gs.js
index 9bc94f70c6..d0069a3df2 100644
--- a/test/language/directive-prologue/14.1-4gs.js
+++ b/test/language/directive-prologue/14.1-4gs.js
@@ -12,8 +12,6 @@ negative:
 flags: [raw]
 ---*/
 
-throw "Test262: This statement should not be evaluated.";
-
 "use strict";
 throw new Error("This code should not execute");
 eval = 42;
diff --git a/test/language/directive-prologue/14.1-5gs.js b/test/language/directive-prologue/14.1-5gs.js
index 6f2844eafd..9a8308e975 100644
--- a/test/language/directive-prologue/14.1-5gs.js
+++ b/test/language/directive-prologue/14.1-5gs.js
@@ -12,8 +12,6 @@ negative:
 flags: [raw]
 ---*/
 
-throw "Test262: This statement should not be evaluated.";
-
 "a";
 "use strict";
 "c";
-- 
GitLab