mirror of https://github.com/tc39/test262.git
Add for-of tests with bogus initializers (#2182)
This commit is contained in:
parent
8cc85b875d
commit
465d0b587e
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (const [x] = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (const {x} = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (let [x] = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (let {x} = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForBinding position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (var ForBinding of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (var [x] = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForBinding position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (var ForBinding of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (var {x} = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (const x = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (let x = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForBinding position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for await (var ForBinding of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [async-iteration]
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function fn() {
|
||||
for await (var x = 1 of []) {}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (const [x] = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (const {x} = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (let [x] = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (let {x} = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForBinding position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (var ForBinding of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (var [x] = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForBinding position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (var ForBinding of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (var {x} = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (const x = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForDeclaration position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (ForDeclaration of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (let x = 1 of []) {}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-iteration-statements
|
||||
description: >
|
||||
Initializer is not allowed in head's ForBinding position.
|
||||
info: |
|
||||
IterationStatement:
|
||||
for (var ForBinding of AssignmentExpression) Statement
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
for (var x = 1 of []) {}
|
Loading…
Reference in New Issue