summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pennisi <mike@mikepennisi.com>2017-06-30 16:33:57 -0400
committerRick Waldron <waldron.rick@gmail.com>2017-07-13 12:27:29 -0400
commit3269aea2abe14df534fb063d920625c411ab8a5f (patch)
tree5523a6bbd6a4acbbb70f5f88fa2b786b6a454065
parentaf8ec67363069bb7a7a27f8a31026e9eaa881eef (diff)
downloadqtdeclarative-testsuites-3269aea2abe14df534fb063d920625c411ab8a5f.tar.gz
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.
-rw-r--r--lint.whitelist5
-rw-r--r--test/language/directive-prologue/10.1.1-2gs.js2
-rw-r--r--test/language/directive-prologue/10.1.1-5gs.js2
-rw-r--r--test/language/directive-prologue/10.1.1-8gs.js2
-rw-r--r--test/language/directive-prologue/14.1-4gs.js2
-rw-r--r--test/language/directive-prologue/14.1-5gs.js2
6 files changed, 5 insertions, 10 deletions
diff --git a/lint.whitelist b/lint.whitelist
index 02101a660..12608cc30 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 b6a6ef26c..c503c4861 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 05e2ad87a..d77ac7706 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 ac8581c37..9a298adf0 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 9bc94f70c..d0069a3df 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 6f2844eaf..9a8308e97 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";