mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Move throw "…"
for negative parsing errors to a helper function
Closes #1634.
This commit is contained in:
parent
3936950114
commit
e3feffb01e
CONTRIBUTING.mdINTERPRETING.md
harness
src
async-functions
await-as-binding-identifier-escaped.caseawait-as-binding-identifier.caseawait-as-identifier-reference-escaped.caseawait-as-identifier-reference.caseawait-as-label-identifier-escaped.caseawait-as-label-identifier.case
async-generators
await-as-binding-identifier-escaped.caseawait-as-binding-identifier.caseawait-as-identifier-reference-escaped.caseawait-as-identifier-reference.caseawait-as-label-identifier-escaped.caseawait-as-label-identifier.caseyield-as-binding-identifier-escaped.caseyield-as-binding-identifier.caseyield-as-identifier-reference-escaped.caseyield-as-identifier-reference.caseyield-as-label-identifier-escaped.caseyield-as-label-identifier.caseyield-identifier-spread-strict.caseyield-identifier-strict.case
class-elements
delete-error
cls-decl-field-delete-covered.templatecls-decl-field-delete-twice-covered.templatecls-decl-field-delete.templatecls-decl-method-delete-covered.templatecls-decl-method-delete-twice-covered.templatecls-decl-method-delete.templatecls-expr-field-delete-covered.templatecls-expr-field-delete-twice-covered.templatecls-expr-field-delete.templatecls-expr-method-delete-covered.templatecls-expr-method-delete-twice-covered.templatecls-expr-method-delete.template
initializer-error
cls-decl-fields-arrow-fnc.templatecls-decl-fields-comp-name.templatecls-decl-fields-equality.templatecls-decl-fields-literal-name.templatecls-decl-fields-private-arrow-fnc.templatecls-decl-fields-private-name.templatecls-decl-fields-private-ternary.templatecls-decl-fields-private-typeof.templatecls-decl-fields-static-comp-name.templatecls-decl-fields-static-literal-name.templatecls-decl-fields-static-private-name.templatecls-decl-fields-static-string-literal-name.templatecls-decl-fields-string-literal-name.templatecls-decl-fields-ternary.templatecls-decl-fields-typeof.templatecls-expr-fields-arrow-fnc.templatecls-expr-fields-comp-name.templatecls-expr-fields-equality.templatecls-expr-fields-literal-name.templatecls-expr-fields-private-arrow-fnc.templatecls-expr-fields-private-name.templatecls-expr-fields-private-ternary.templatecls-expr-fields-private-typeof.templatecls-expr-fields-static-comp-name.templatecls-expr-fields-static-literal-name.templatecls-expr-fields-static-private-name.templatecls-expr-fields-static-string-literal-name.templatecls-expr-fields-string-literal-name.templatecls-expr-fields-ternary.templatecls-expr-fields-typeof.template
syntax/invalid
declarations
redeclare-allow-sloppy-function
block-attempt-to-redeclare-async-function-declaration.templateblock-attempt-to-redeclare-async-generator-declaration.templateblock-attempt-to-redeclare-class-declaration.templateblock-attempt-to-redeclare-const-declaration.templateblock-attempt-to-redeclare-function-declaration.templateblock-attempt-to-redeclare-generator-declaration.templateblock-attempt-to-redeclare-let-declaration.templateblock-attempt-to-redeclare-var-declaration.templateswitch-attempt-to-redeclare-async-function-declaration.templateswitch-attempt-to-redeclare-async-generator-declaration.templateswitch-attempt-to-redeclare-class-declaration.templateswitch-attempt-to-redeclare-const-declaration.templateswitch-attempt-to-redeclare-function-declaration.templateswitch-attempt-to-redeclare-generator-declaration.templateswitch-attempt-to-redeclare-let-declaration.templateswitch-attempt-to-redeclare-var-declaration.template
redeclare-allow-var
block-attempt-to-redeclare-async-function-declaration.templateblock-attempt-to-redeclare-async-generator-declaration.templateblock-attempt-to-redeclare-class-declaration.templateblock-attempt-to-redeclare-const-declaration.templateblock-attempt-to-redeclare-function-declaration.templateblock-attempt-to-redeclare-generator-declaration.templateblock-attempt-to-redeclare-let-declaration.templateswitch-attempt-to-redeclare-async-function-declaration.templateswitch-attempt-to-redeclare-async-generator-declaration.templateswitch-attempt-to-redeclare-class-declaration.templateswitch-attempt-to-redeclare-const-declaration.templateswitch-attempt-to-redeclare-function-declaration.templateswitch-attempt-to-redeclare-generator-declaration.templateswitch-attempt-to-redeclare-let-declaration.template
redeclare
@ -217,7 +217,7 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var var = var;
|
||||
```
|
||||
|
@ -86,7 +86,7 @@ properties of the global scope prior to test execution.
|
||||
an Int32. This function may return before a broadcast is received
|
||||
(eg to return to an event loop to await a message) and no code should
|
||||
follow the call to this function.
|
||||
- **`report`** - a function that accepts a single "message" argument,
|
||||
- **`report`** - a function that accepts a single "message" argument,
|
||||
which is converted to a string\* and placed in a transmit queue whence the parent will retrieve it. Messages should be short. (\* Note that string conversion has been implicit since the introduction of this host API, but is now explicit.)
|
||||
- **`sleep`** - a function that takes a millisecond argument and
|
||||
sleeps the agent for approximately that duration.
|
||||
@ -101,7 +101,7 @@ properties of the global scope prior to test execution.
|
||||
and returns it if it exists, or returns `null` otherwise.
|
||||
- **`sleep`** - a function that takes a millisecond argument and
|
||||
sleeps the execution for approximately that duration.
|
||||
- **`monotonicNow`** - a function that returns a value that conforms to [`DOMHighResTimeStamp`][] and is produced in such a way that its semantics conform to **[Monotonic Clock][]**.
|
||||
- **`monotonicNow`** - a function that returns a value that conforms to [`DOMHighResTimeStamp`][] and is produced in such a way that its semantics conform to **[Monotonic Clock][]**.
|
||||
|
||||
|
||||
#### Normative references
|
||||
@ -174,7 +174,7 @@ These tests are expected to generate an uncaught exception. The value of this
|
||||
attribute is a YAML dictonary with two keys:
|
||||
|
||||
- `phase` - the stage of the test interpretation process that the error is
|
||||
expected to be produced; valid phases are:
|
||||
expected to be produced; valid phases are:
|
||||
- `parse`: occurs while parsing the source text.
|
||||
- `early`: occurs prior to evaluation.
|
||||
- `resolution`: occurs during module resolution.
|
||||
@ -203,7 +203,7 @@ negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
'litera'=1;
|
||||
```
|
||||
|
||||
@ -213,7 +213,7 @@ negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
var a\u2E2F;
|
||||
```
|
||||
|
||||
@ -225,7 +225,7 @@ negative:
|
||||
type: ReferenceError
|
||||
flags: [module]
|
||||
---*/
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
export {} from './instn-resolve-empty-export_FIXTURE.js';
|
||||
// instn-resolve-empty-export_FIXTURE.js contains only:
|
||||
// 0++;
|
||||
@ -387,10 +387,10 @@ The `locale` attribute allows tests to declare explicit information regarding lo
|
||||
/*---
|
||||
locale: [en, en-US, ar]
|
||||
---*/
|
||||
|
||||
|
||||
var en = new Intl.PluralRules('en');
|
||||
assert.sameValue(en.select(1), 'one', 'en.select(1) returns "one"');
|
||||
assert.sameValue(en.select(2), 'other', 'en.select(2) returns "other"');
|
||||
assert.sameValue(en.select(2), 'other', 'en.select(2) returns "other"');
|
||||
|
||||
var enUS = new Intl.PluralRules('en-US');
|
||||
assert.sameValue(enUS.select(1), 'one', 'enUS.select(1) returns "one"');
|
||||
|
@ -21,3 +21,7 @@ var $ERROR;
|
||||
$ERROR = function $ERROR(message) {
|
||||
throw new Test262Error(message);
|
||||
};
|
||||
|
||||
function failIfCodeGetsEvaluated() {
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
}
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
var \u0061wait;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
var await;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
void \u0061wait;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
void await;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
\u0061wait: ;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
await: ;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
var \u0061wait;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
var await;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
void \u0061wait;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
void await;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
\u0061wait: ;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
await: ;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
var yi\u0065ld;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
var yield;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
void yi\u0065ld;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
void yield;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
yi\u0065ld: ;
|
||||
|
@ -18,6 +18,6 @@ template: syntax
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
yield: ;
|
||||
|
@ -20,7 +20,7 @@ negative:
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
return {
|
||||
...(function() {
|
||||
|
@ -13,7 +13,7 @@ negative:
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
//- body
|
||||
(function() {
|
||||
var yield;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x;
|
||||
|
@ -23,7 +23,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x;
|
||||
|
@ -23,7 +23,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x;
|
||||
|
@ -23,7 +23,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x;
|
||||
|
@ -29,7 +29,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x;
|
||||
|
@ -23,7 +23,7 @@ negative:
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x;
|
||||
|
@ -8,7 +8,7 @@ name: arrow function expression
|
||||
features: [arrow-function, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
x = () => /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: computed ClassElementName
|
||||
features: [class, class-fields-public, computed-property-names]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var x = "string";
|
||||
class C {
|
||||
|
@ -8,7 +8,7 @@ name: equality expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
x = {} == /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: private field, arrow function expression
|
||||
features: [class, arrow-function, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x = () => /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: ClassElementName PrivateName
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: private field, ternary expression
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x = false ? {} : /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: private field, typeof expression
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
#x = typeof /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: static computed ClassElementName
|
||||
features: [class, class-static-fields-public, computed-property-names]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var x = "string";
|
||||
class C {
|
||||
|
@ -8,7 +8,7 @@ name: static literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
static x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: static PrivateName
|
||||
features: [class, class-static-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
static #x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: static string literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
static 'x' = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: string literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
'x' = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: ternary expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
x = false ? {} : /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: typeof expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C {
|
||||
x = typeof /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: arrow function expression
|
||||
features: [arrow-function, class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
x = () => /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: computed ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var x = "string";
|
||||
var C = class {
|
||||
|
@ -8,7 +8,7 @@ name: equality expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
x = {} == /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: private field, arrow function expression
|
||||
features: [class, arrow-function, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x = () => /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: ClassElementName PrivateName
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: private field, ternary expression
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x = true ? {} : /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: private field, typeof expression
|
||||
features: [class, class-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
#x = typeof /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: static computed ClassElementName
|
||||
features: [class, class-static-fields-public, computed-property-names]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var x = "string";
|
||||
var C = class {
|
||||
|
@ -8,7 +8,7 @@ name: static literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
static x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: static PrivateName
|
||||
features: [class, class-static-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
static #x = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: static string literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
static 'x' = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: string literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
'x' = /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: ternary expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
x = true ? {} : /*{ initializer }*/;
|
||||
|
@ -8,7 +8,7 @@ name: typeof expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class {
|
||||
x = typeof /*{ initializer }*/;
|
||||
|
@ -11,7 +11,7 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
class C /*{ heritage }*/{
|
||||
/*{ elements }*/
|
||||
|
@ -11,7 +11,7 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
var C = class /*{ heritage }*/{
|
||||
/*{ elements }*/
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ async function f() {} /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ async function* f() {} /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ class f {} /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ const f = 0; /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ function f() {} /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ function* f() {} /*{ body }*/ }
|
||||
|
2
src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-let-declaration.template
2
src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-let-declaration.template
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ let f; /*{ body }*/ }
|
||||
|
2
src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-var-declaration.template
2
src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-var-declaration.template
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ var f; /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: async function f() {} default: /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: class f {} default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: const f = 0; default: /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: function f() {} default: /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: function* f() {} default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: let f; default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: var f; default: /*{ body }*/ }
|
||||
|
2
src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-function-declaration.template
2
src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-function-declaration.template
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ async function f() {} /*{ body }*/ }
|
||||
|
2
src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-generator-declaration.template
2
src/declarations/redeclare-allow-var/block-attempt-to-redeclare-async-generator-declaration.template
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ async function* f() {} /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ class f {} /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ const f = 0; /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ function f() {} /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ function* f() {} /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ let f; /*{ body }*/ }
|
||||
|
2
src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template
2
src/declarations/redeclare-allow-var/switch-attempt-to-redeclare-async-function-declaration.template
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: async function f() {} default: /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: async function* f() {} default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: class f {} default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: const f = 0; default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: function f() {} default: /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [generators]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: function* f() {} default: /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
switch (0) { case 1: let f; default: /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ async function f() {} /*{ body }*/ }
|
||||
|
@ -16,6 +16,6 @@ negative:
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ async function* f() {} /*{ body }*/ }
|
||||
|
@ -15,6 +15,6 @@ negative:
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
failIfCodeGetsEvaluated();
|
||||
|
||||
{ class f {} /*{ body }*/ }
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user