Force "early error" tests to fail if evaluated

This pattern makes expectations more explicit by making test files more
literal.
This commit is contained in:
Mike Pennisi 2017-04-29 16:31:08 -04:00 committed by Rick Waldron
parent e5ffc904d6
commit 81d00def42
1181 changed files with 2367 additions and 9 deletions

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
var \u0061wait;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
var await;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
void \u0061wait;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
void await;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
\u0061wait: ;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
await: ;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
var \u0061wait;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
var await;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
void \u0061wait;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
void await;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
\u0061wait: ;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
await: ;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
var yi\u0065ld;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
var yield;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
void yi\u0065ld;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
void yield;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
yi\u0065ld: ;

View File

@ -17,5 +17,7 @@ negative:
template: syntax
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
yield: ;

View File

@ -19,6 +19,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
return {
...(function() {

View File

@ -12,6 +12,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- body
(function() {
var yield;

View File

@ -16,4 +16,6 @@ negative:
features: [async-functions]
---*/
throw "Test262: This statement should not be evaluated.";
{ async function f() {} /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-iteration]
---*/
throw "Test262: This statement should not be evaluated.";
{ async function* f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ class f {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ const f = 0; /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
flags: [onlyStrict]
---*/
throw "Test262: This statement should not be evaluated.";
{ function f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ function* f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ let f; /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ var f; /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-functions]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: async function f() {} default: /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-iteration]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: class f {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: const f = 0; default: /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
flags: [onlyStrict]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: function f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: function* f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: let f; default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: var f; default: /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-functions]
---*/
throw "Test262: This statement should not be evaluated.";
{ async function f() {} /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-iteration]
---*/
throw "Test262: This statement should not be evaluated.";
{ async function* f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ class f {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ const f = 0; /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ function f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ function* f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ let f; /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-functions]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: async function f() {} default: /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-iteration]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: class f {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: const f = 0; default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: function f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: function* f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: let f; default: /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-functions]
---*/
throw "Test262: This statement should not be evaluated.";
{ async function f() {} /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-iteration]
---*/
throw "Test262: This statement should not be evaluated.";
{ async function* f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ class f {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ const f = 0; /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ function f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ function* f() {} /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ let f; /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
{ var f; /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-functions]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: async function f() {} default: /*{ body }*/ }

View File

@ -16,4 +16,6 @@ negative:
features: [async-iteration]
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: class f {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: const f = 0; default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: function f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: function* f() {} default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: let f; default: /*{ body }*/ }

View File

@ -15,4 +15,6 @@ negative:
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
switch (0) { case 1: var f; default: /*{ body }*/ }

View File

@ -13,6 +13,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[ x = yield ]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[[(x, y)]]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[[x[yield]]]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[{ get x() {} }]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[{ x = yield }]
//- vals

View File

@ -15,6 +15,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[arguments]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[ x[yield] ]
//- vals

View File

@ -13,6 +13,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[ x = yield ]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[[(x, y)]]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[[x[yield]]]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[{ get x() {} }]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[{ x = yield }]
//- vals

View File

@ -15,6 +15,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[arguments]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[ x[yield] ]
//- vals

View File

@ -12,6 +12,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...x, y]
//- vals

View File

@ -12,6 +12,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...x,]
//- vals

View File

@ -12,6 +12,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...x, ...y]
//- vals

View File

@ -12,6 +12,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...x,]
//- vals

View File

@ -12,6 +12,7 @@ negative:
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
var x;
//- elems
[...x = 1]

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...[(x, y)]]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...[x[yield]]]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...{ get x() {} }]
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
[...{ x = yield }]
//- vals

View File

@ -15,6 +15,7 @@ negative:
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
var x = {};
//- elems
[...x[yield]]

View File

@ -15,6 +15,7 @@ negative:
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
(function*() {
//- elems
{ yield }

View File

@ -13,6 +13,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ yield }
//- vals

View File

@ -13,6 +13,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ eval = 0 }
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ x = yield }
//- vals

View File

@ -13,6 +13,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ eval }
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ x: x = yield }
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ x: x[yield] }
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ x: [(x, y)] }
//- vals

View File

@ -14,6 +14,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ x: [x = yield] }
//- vals

View File

@ -15,6 +15,8 @@ negative:
type: SyntaxError
---*/
//- setup
throw "Test262: This statement should not be evaluated.";
//- elems
{ x: { get x() {} } }
//- vals

Some files were not shown because too many files have changed in this diff Show More