Add for-of tests with bogus initializers (#2182)

This commit is contained in:
Aleksey Shvayka 2019-05-29 22:37:52 +03:00 committed by Leo Balter
parent 8cc85b875d
commit 465d0b587e
18 changed files with 333 additions and 0 deletions

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}
}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}

View File

@ -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 []) {}