Rename to $DONOTEVALUATE per @leobalter's suggestion

This commit is contained in:
Mathias Bynens 2018-10-11 16:59:24 +02:00
parent e3feffb01e
commit b9daa57dcb
3074 changed files with 3086 additions and 3085 deletions

View File

@ -191,18 +191,19 @@ Each test case is run in a fresh JavaScript environment; in a browser, this will
Function | Purpose
---------|--------
Test262Error(message) | constructor for an error object that indicates a test failure
$DONE(arg) | see Writing Asynchronous Tests, below
assert(value, message) | throw a new Test262Error instance if the specified value is not strictly equal to the JavaScript `true` value; accepts an optional string message for use in creating the error
assert.sameValue(actual, expected, message) | throw a new Test262Error instance if the first two arguments are not [the same value](https://tc39.github.io/ecma262/#sec-samevalue); accepts an optional string message for use in creating the error
assert.notSameValue(actual, unexpected, message) | throw a new Test262Error instance if the first two arguments are [the same value](https://tc39.github.io/ecma262/#sec-samevalue); accepts an optional string message for use in creating the error
assert.throws(expectedErrorConstructor, fn, message) | throw a new Test262Error instance if the provided function does not throw an error, or if the constructor of the value thrown does not match the provided constructor
$ERROR(message) | construct a Test262Error object and throw it <br>**DEPRECATED** -- Do not use in new tests. Use `assert`, `assert.*`, or `throw new Test262Error` instead.
`Test262Error(message)` | constructor for an error object that indicates a test failure
`$DONE(arg)` | see [Writing Asynchronous Tests](#writing-asynchronous-tests), below
`assert(value, message)` | throw a new Test262Error instance if the specified value is not strictly equal to the JavaScript `true` value; accepts an optional string message for use in creating the error
`assert.sameValue(actual, expected, message)` | throw a new Test262Error instance if the first two arguments are not [the same value](https://tc39.github.io/ecma262/#sec-samevalue); accepts an optional string message for use in creating the error
`assert.notSameValue(actual, unexpected, message)` | throw a new Test262Error instance if the first two arguments are [the same value](https://tc39.github.io/ecma262/#sec-samevalue); accepts an optional string message for use in creating the error
`assert.throws(expectedErrorConstructor, fn, message)` | throw a new Test262Error instance if the provided function does not throw an error, or if the constructor of the value thrown does not match the provided constructor
`$DONOTEVALUATE()` | throw an exception if the code gets evaluated. This is useful for [negative test cases for parsing errors](#handling-errors-and-negative-test-cases)
`$ERROR(message)` | construct a Test262Error object and throw it <br>**DEPRECATED** -- Do not use in new tests. Use `assert`, `assert.*`, or `throw new Test262Error` instead.
```
```javascript
/// error class
function Test262Error(message) {
//[omitted body]
// [omitted body]
}
```
@ -217,7 +218,7 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var var = var;
```

View File

@ -203,7 +203,7 @@ negative:
phase: parse
type: ReferenceError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
'litera'=1;
```
@ -213,7 +213,7 @@ negative:
phase: parse
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var a\u2E2F;
```
@ -225,7 +225,7 @@ negative:
type: ReferenceError
flags: [module]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
export {} from './instn-resolve-empty-export_FIXTURE.js';
// instn-resolve-empty-export_FIXTURE.js contains only:
// 0++;

View File

@ -22,6 +22,6 @@ $ERROR = function $ERROR(message) {
throw new Test262Error(message);
};
function failIfCodeGetsEvaluated() {
function $DONOTEVALUATE() {
throw "Test262: This statement should not be evaluated.";
}

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
var \u0061wait;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
var await;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
void \u0061wait;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
void await;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
\u0061wait: ;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
await: ;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
var \u0061wait;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
var await;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
void \u0061wait;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
void await;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
\u0061wait: ;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
await: ;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
var yi\u0065ld;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
var yield;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
void yi\u0065ld;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
void yield;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
yi\u0065ld: ;

View File

@ -18,6 +18,6 @@ template: syntax
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
yield: ;

View File

@ -20,7 +20,7 @@ negative:
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
return {
...(function() {

View File

@ -13,7 +13,7 @@ negative:
---*/
//- setup
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
//- body
(function() {
var yield;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x;

View File

@ -23,7 +23,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x;

View File

@ -23,7 +23,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x;

View File

@ -23,7 +23,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x;

View File

@ -29,7 +29,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x;

View File

@ -23,7 +23,7 @@ negative:
phase: parse
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x;

View File

@ -8,7 +8,7 @@ name: arrow function expression
features: [arrow-function, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
x = () => /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: computed ClassElementName
features: [class, class-fields-public, computed-property-names]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var x = "string";
class C {

View File

@ -8,7 +8,7 @@ name: equality expression
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
x = {} == /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: literal ClassElementName
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: private field, arrow function expression
features: [class, arrow-function, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x = () => /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: ClassElementName PrivateName
features: [class, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: private field, ternary expression
features: [class, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x = false ? {} : /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: private field, typeof expression
features: [class, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
#x = typeof /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: static computed ClassElementName
features: [class, class-static-fields-public, computed-property-names]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var x = "string";
class C {

View File

@ -8,7 +8,7 @@ name: static literal ClassElementName
features: [class, class-static-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
static x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: static PrivateName
features: [class, class-static-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
static #x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: static string literal ClassElementName
features: [class, class-static-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
static 'x' = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: string literal ClassElementName
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
'x' = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: ternary expression
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
x = false ? {} : /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: typeof expression
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C {
x = typeof /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: arrow function expression
features: [arrow-function, class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
x = () => /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: computed ClassElementName
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var x = "string";
var C = class {

View File

@ -8,7 +8,7 @@ name: equality expression
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
x = {} == /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: literal ClassElementName
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: private field, arrow function expression
features: [class, arrow-function, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x = () => /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: ClassElementName PrivateName
features: [class, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: private field, ternary expression
features: [class, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x = true ? {} : /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: private field, typeof expression
features: [class, class-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
#x = typeof /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: static computed ClassElementName
features: [class, class-static-fields-public, computed-property-names]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var x = "string";
var C = class {

View File

@ -8,7 +8,7 @@ name: static literal ClassElementName
features: [class, class-static-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
static x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: static PrivateName
features: [class, class-static-fields-private]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
static #x = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: static string literal ClassElementName
features: [class, class-static-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
static 'x' = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: string literal ClassElementName
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
'x' = /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: ternary expression
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
x = true ? {} : /*{ initializer }*/;

View File

@ -8,7 +8,7 @@ name: typeof expression
features: [class, class-fields-public]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class {
x = typeof /*{ initializer }*/;

View File

@ -11,7 +11,7 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
class C /*{ heritage }*/{
/*{ elements }*/

View File

@ -11,7 +11,7 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
var C = class /*{ heritage }*/{
/*{ elements }*/

View File

@ -16,6 +16,6 @@ negative:
features: [async-functions]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ async function f() {} /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-iteration]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ async function* f() {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ class f {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ const f = 0; /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
flags: [onlyStrict]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ function f() {} /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [generators]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ function* f() {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ let f; /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ var f; /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-functions]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: async function f() {} default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-iteration]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: class f {} default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: const f = 0; default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
flags: [onlyStrict]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: function f() {} default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [generators]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: function* f() {} default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: let f; default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: var f; default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-functions]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ async function f() {} /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-iteration]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ async function* f() {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ class f {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ const f = 0; /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ function f() {} /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [generators]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ function* f() {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ let f; /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-functions]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: async function f() {} default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-iteration]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: class f {} default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: const f = 0; default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: function f() {} default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [generators]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: function* f() {} default: /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
switch (0) { case 1: let f; default: /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-functions]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ async function f() {} /*{ body }*/ }

View File

@ -16,6 +16,6 @@ negative:
features: [async-iteration]
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ async function* f() {} /*{ body }*/ }

View File

@ -15,6 +15,6 @@ negative:
type: SyntaxError
---*/
failIfCodeGetsEvaluated();
$DONOTEVALUATE();
{ class f {} /*{ body }*/ }

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