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.
This commit is contained in:
Mike Pennisi 2017-06-30 16:33:57 -04:00 committed by Rick Waldron
parent af8ec67363
commit 3269aea2ab
6 changed files with 5 additions and 10 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -12,8 +12,6 @@ negative:
flags: [raw]
---*/
throw "Test262: This statement should not be evaluated.";
"use strict";
"use strict";
var public = 1;

View File

@ -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;

View File

@ -12,8 +12,6 @@ negative:
flags: [raw]
---*/
throw "Test262: This statement should not be evaluated.";
"a";
"use strict";
"c";