From d4a91a163b1a99e42bae0a74fe9636ed44d7b1e4 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Tue, 24 Sep 2019 16:45:56 -0400 Subject: [PATCH] Improve coverage: function declarations Previously, these tests were limited to strict mode. The syntactic restriction under test also applied outside of strict mode even when Annex B is observed, so configure the tests to also run outside of strict mode. --- .../in-statement-position-do-statement-while-expression.js | 3 +-- .../in-statement-position-for-statement.js | 3 +-- .../in-statement-position-while-expression-statement.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/language/block-scope/syntax/function-declarations/in-statement-position-do-statement-while-expression.js b/test/language/block-scope/syntax/function-declarations/in-statement-position-do-statement-while-expression.js index 1912694265..c9f35f2ed1 100644 --- a/test/language/block-scope/syntax/function-declarations/in-statement-position-do-statement-while-expression.js +++ b/test/language/block-scope/syntax/function-declarations/in-statement-position-do-statement-while-expression.js @@ -3,12 +3,11 @@ /*--- es6id: 13.1 description: > - function declarations in statement position in strict mode: + function declarations in statement position: do Statement while ( Expression ) negative: phase: parse type: SyntaxError -flags: [onlyStrict] ---*/ $DONOTEVALUATE(); diff --git a/test/language/block-scope/syntax/function-declarations/in-statement-position-for-statement.js b/test/language/block-scope/syntax/function-declarations/in-statement-position-for-statement.js index 52628c11d4..bd5d9fb7de 100644 --- a/test/language/block-scope/syntax/function-declarations/in-statement-position-for-statement.js +++ b/test/language/block-scope/syntax/function-declarations/in-statement-position-for-statement.js @@ -3,12 +3,11 @@ /*--- es6id: 13.1 description: > - function declarations in statement position in strict mode: + function declarations in statement position: for ( ;;) Statement negative: phase: parse type: SyntaxError -flags: [onlyStrict] ---*/ $DONOTEVALUATE(); diff --git a/test/language/block-scope/syntax/function-declarations/in-statement-position-while-expression-statement.js b/test/language/block-scope/syntax/function-declarations/in-statement-position-while-expression-statement.js index 85d0135301..740bf874ff 100644 --- a/test/language/block-scope/syntax/function-declarations/in-statement-position-while-expression-statement.js +++ b/test/language/block-scope/syntax/function-declarations/in-statement-position-while-expression-statement.js @@ -3,12 +3,11 @@ /*--- es6id: 13.1 description: > - function declarations in statement position in strict mode: + function declarations in statement position: while ( Expression ) Statement negative: phase: parse type: SyntaxError -flags: [onlyStrict] ---*/ $DONOTEVALUATE();