Merge pull request #778 from jugglinmike/negative-reform-9

Encode expected error "phase"
This commit is contained in:
Leo Balter 2016-10-20 12:59:30 -04:00 committed by GitHub
commit 638c4801e6
1423 changed files with 4350 additions and 1515 deletions

View File

@ -70,14 +70,21 @@ Eg: Object.prototype.toString - '[object Null]' will be returned when
'this' value is null 'this' value is null
#### negative #### negative
**negative**: [regex] **negative**: [dictionary containing **phase** and **type**]
This means the test is expected to throw an error of the given type. If no error is thrown, a test failure is reported. This means the test is expected to throw an error of the given type. If no error is thrown, a test failure is reported.
If an error is thrown, it is implicitly converted to a string. The second parameter is a regular expression that will be matched against this string. If the match fails, a test failure is reported. Thus the regular expression can match either the error name, or the message contents, or both. - **type**- If an error is thrown, it is implicitly converted to a string. In order for the test to pass, this value must match the name of the error constructor.
- **phase** - Negative tests whose **phase** value is "early" must produce the specified error prior to executing code. The value "runtime" dictates that the error is expected to be produced as a result of executing the test code.
For best practices on how to use the negative tag please see Handling Errors and Negative Test Cases, below. For best practices on how to use the negative tag please see Handling Errors and Negative Test Cases, below.
For example:
negative:
phase: early
type: ReferenceError
#### es5id #### es5id
**es5id**: [es5-test-id] **es5id**: [es5-test-id]
@ -150,12 +157,6 @@ assert.sameValue(actual, expected, message) | throw a new Test262Error instance
assert.notSameValue(actual, unexpected, message) | throw a new Test262Error instance if the first two arguments are [the same value](http://www.ecma-international.org/ecma-262/6.0/#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](http://www.ecma-international.org/ecma-262/6.0/#sec-samevalue); accepts an optional string message for use in creating the error
assert.throws(expectedErrorConstructor, fn) | 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 assert.throws(expectedErrorConstructor, fn) | 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
The test harness also defines the following objects:
Identifier | Purpose
-----------|--------
NotEarlyError | preconstructed error object used for testing syntax and other early errors; see Syntax Error & Early Error, below
``` ```
/// error class /// error class
function Test262Error(message) { function Test262Error(message) {
@ -171,8 +172,6 @@ function $ERROR(message) {
function $DONE(arg) { function $DONE(arg) {
//[omitted body] //[omitted body]
} }
var NotEarlyError = new Error(...);
``` ```
## Handling Errors and Negative Test Cases ## Handling Errors and Negative Test Cases
@ -181,12 +180,11 @@ Expectations for **parsing errors** should be declared using [the `negative` fro
```javascript ```javascript
/*--- /*---
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
// This `throw` statement guarantees that no code is executed in order to
// trigger the SyntaxError.
throw NotEarlyError;
var var = var; var var = var;
``` ```

View File

@ -117,20 +117,38 @@ structured as [YAML](http://yaml.org/).
### `negative` ### `negative`
These tests are expected to generate an uncaught exception. The value of this These tests are expected to generate an uncaught exception. The value of this
attribute is the name of the constructor of the expected error. If a test attribute is a YAML dictonary with two keys:
configured with the `negative` attribute completes without throwing an
exception, or if the name of the thrown exception's constructor does not match - `phase` - the stage of the test interpretation process that the error is
the specified constructor name, the test must be interpreted as "failing." expected to be produced; either "early" (meaning, "prior to evaluation") or
"runtime" (meaning, "during evaluation"); in the case of "early", additional
test transformation may be required--see below
- `type` - the name of the constructor of the expected error
If a test configured with the `negative` attribute completes without throwing
an exception, or if the name of the thrown exception's constructor does not
match the specified constructor name, or if the error occurs at a phase that
differs from the indicated phase, the test must be interpreted as "failing."
*Example:* *Example:*
```js ```js
/*--- /*---
negative: ReferenceError negative:
phase: runtime
type: ReferenceError
---*/ ---*/
unresolvable; unresolvable;
``` ```
Consumers are free to assert the "early" phase as they see fit.
For example, it is possible to insert a `throw` statement with a unique error
type at the beginning of the test file. In this case, the statement should be
inserted *after* the directive desribed in the section titled "Strict Mode"
(where appropriate), though it must *not* be inserted for tests containing the
"raw" flag.
### `includes` ### `includes`
One or more files whose content must be evaluated in the test realm's global One or more files whose content must be evaluated in the test realm's global

View File

@ -1,10 +1,6 @@
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Copyright (c) 2012 Ecma International. All rights reserved.
/// This code is governed by the BSD license found in the LICENSE file. /// This code is governed by the BSD license found in the LICENSE file.
var NotEarlyErrorString = "NotEarlyError";
var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$";
var NotEarlyError = new Error(NotEarlyErrorString);
function Test262Error(message) { function Test262Error(message) {
this.message = message || ""; this.message = message || "";
} }

View File

@ -5,7 +5,9 @@ desc: >
It is a Syntax Error if BoundNames of FormalParameters contains any duplicate It is a Syntax Error if BoundNames of FormalParameters contains any duplicate
elements. elements.
template: syntax template: syntax
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: | info: |
14.1.2 Static Semantics: Early Errors 14.1.2 Static Semantics: Early Errors

View File

@ -20,7 +20,9 @@ info: |
...BindingIdentifier[?Yield] ...BindingIdentifier[?Yield]
...BindingPattern[?Yield] ...BindingPattern[?Yield]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- params //- params

View File

@ -10,7 +10,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -8,7 +8,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.4 es6id: 12.14.5.4
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
AssignmentPattern as the goal symbol. AssignmentPattern as the goal symbol.
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.3 es6id: 12.14.5.3
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
AssignmentPattern as the goal symbol. AssignmentPattern as the goal symbol.
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.3 es6id: 12.14.5.3
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -10,7 +10,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.4 es6id: 12.14.5.4
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -7,7 +7,9 @@ desc: >
AssignmentElementList. AssignmentElementList.
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -7,7 +7,9 @@ desc: >
AssignmentElementList. AssignmentElementList.
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -7,7 +7,9 @@ desc: >
AssignmentElementList. AssignmentElementList.
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -7,7 +7,9 @@ desc: >
AssignmentRestElement in a AssignmentElementList. AssignmentRestElement in a AssignmentElementList.
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -6,7 +6,9 @@ desc: >
The AssignmentRestElement does not support an initializer. The AssignmentRestElement does not support an initializer.
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- setup //- setup

View File

@ -9,7 +9,9 @@ desc: >
AssignmentPattern as the goal symbol. AssignmentPattern as the goal symbol.
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.3 es6id: 12.14.5.3
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
AssignmentPattern as the goal symbol. AssignmentPattern as the goal symbol.
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.3 es6id: 12.14.5.3
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- setup //- setup

View File

@ -9,7 +9,9 @@ template: syntax
es6id: 12.14.5 es6id: 12.14.5
flags: [noStrict] flags: [noStrict]
features: [generators] features: [generators]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- setup //- setup

View File

@ -8,7 +8,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -8,7 +8,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5 es6id: 12.14.5
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -8,7 +8,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.4 es6id: 12.14.5.4
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.4 es6id: 12.14.5.4
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
AssignmentPattern as the goal symbol. AssignmentPattern as the goal symbol.
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.4 es6id: 12.14.5.4
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -10,7 +10,9 @@ desc: >
the goal symbol. the goal symbol.
template: syntax template: syntax
es6id: 12.14.5.1 es6id: 12.14.5.1
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -9,7 +9,9 @@ desc: >
template: syntax template: syntax
es6id: 12.14.5.4 es6id: 12.14.5.4
flags: [onlyStrict] flags: [onlyStrict]
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//- elems //- elems

View File

@ -3,7 +3,9 @@
/*--- /*---
template: default template: default
desc: Reset element (nested array pattern) does not support initializer desc: Reset element (nested array pattern) does not support initializer
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: > info: >
13.3.3 Destructuring Binding Patterns 13.3.3 Destructuring Binding Patterns

View File

@ -3,7 +3,9 @@
/*--- /*---
template: default template: default
desc: Reset element (identifier) does not support initializer desc: Reset element (identifier) does not support initializer
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: > info: >
13.3.3 Destructuring Binding Patterns 13.3.3 Destructuring Binding Patterns

View File

@ -3,7 +3,9 @@
/*--- /*---
template: default template: default
desc: Reset element (nested object pattern) does not support initializer desc: Reset element (nested object pattern) does not support initializer
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: > info: >
13.3.3 Destructuring Binding Patterns 13.3.3 Destructuring Binding Patterns

View File

@ -3,7 +3,9 @@
/*--- /*---
template: default template: default
desc: Rest element (array binding pattern) may not be followed by any element desc: Rest element (array binding pattern) may not be followed by any element
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: > info: >
13.3.3 Destructuring Binding Patterns 13.3.3 Destructuring Binding Patterns

View File

@ -3,7 +3,9 @@
/*--- /*---
template: default template: default
desc: Rest element (identifier) may not be followed by any element desc: Rest element (identifier) may not be followed by any element
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: > info: >
13.3.3 Destructuring Binding Patterns 13.3.3 Destructuring Binding Patterns

View File

@ -3,7 +3,9 @@
/*--- /*---
template: default template: default
desc: Rest element (object binding pattern) may not be followed by any element desc: Rest element (object binding pattern) may not be followed by any element
negative: SyntaxError negative:
phase: early
type: SyntaxError
info: > info: >
13.3.3 Destructuring Binding Patterns 13.3.3 Destructuring Binding Patterns

View File

@ -17,7 +17,9 @@ info: |
HTMLCloseComment :: HTMLCloseComment ::
WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt] WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
negative: Test262Error negative:
phase: runtime
type: Test262Error
---*/ ---*/
var counter = 0; var counter = 0;

View File

@ -19,7 +19,9 @@ info: |
HTMLCloseComment :: HTMLCloseComment ::
WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt] WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
negative: Test262Error negative:
phase: runtime
type: Test262Error
---*/ ---*/
var foo = [23] var foo = [23]

View File

@ -17,7 +17,9 @@ info: |
HTMLCloseComment :: HTMLCloseComment ::
WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt] WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
negative: Test262Error negative:
phase: runtime
type: Test262Error
---*/ ---*/
var counter = 0; var counter = 0;

View File

@ -14,7 +14,9 @@ info: |
SingleLineHTMLOpenComment :: SingleLineHTMLOpenComment ::
<!--SingleLineCommentCharsopt <!--SingleLineCommentCharsopt
negative: Test262Error negative:
phase: runtime
type: Test262Error
---*/ ---*/
var counter = 0; var counter = 0;

View File

@ -9,7 +9,9 @@ info: |
any duplicate entries for "__proto__" and at least two of those entries any duplicate entries for "__proto__" and at least two of those entries
were obtained from productions of the form were obtained from productions of the form
PropertyDefinition : PropertyName : AssignmentExpression . PropertyDefinition : PropertyName : AssignmentExpression .
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
({ ({

View File

@ -7,7 +7,9 @@ description: >
semantics of the surrounding context. semantics of the surrounding context.
The SV of EscapeSequence :: HexEscapeSequence is the SV of the The SV of EscapeSequence :: HexEscapeSequence is the SV of the
HexEscapeSequence. HexEscapeSequence.
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/

View File

@ -4,7 +4,9 @@
esid: sec-initializers-in-forin-statement-heads esid: sec-initializers-in-forin-statement-heads
description: > description: >
for-in heads prohibit AssignmentExpressions for-in heads prohibit AssignmentExpressions
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
var a; var a;
throw NotEarlyError; throw NotEarlyError;

View File

@ -4,7 +4,9 @@
esid: sec-initializers-in-forin-statement-heads esid: sec-initializers-in-forin-statement-heads
description: > description: >
for-in initializers with const are prohibited for-in initializers with const are prohibited
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
throw NotEarlyError; throw NotEarlyError;
for (const a = 0 in {}); for (const a = 0 in {});

View File

@ -4,7 +4,9 @@
esid: sec-initializers-in-forin-statement-heads esid: sec-initializers-in-forin-statement-heads
description: > description: >
for-in initializers with let are prohibited for-in initializers with let are prohibited
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
throw NotEarlyError; throw NotEarlyError;
for (let a = 0 in {}); for (let a = 0 in {});

View File

@ -4,7 +4,9 @@
esid: sec-initializers-in-forin-statement-heads esid: sec-initializers-in-forin-statement-heads
description: > description: >
for-in initializers in strict mode are prohibited for-in initializers in strict mode are prohibited
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
throw NotEarlyError; throw NotEarlyError;

View File

@ -4,7 +4,9 @@
esid: sec-initializers-in-forin-statement-heads esid: sec-initializers-in-forin-statement-heads
description: > description: >
for-in initializers with ArrayBindingPatterns are always prohibited for-in initializers with ArrayBindingPatterns are always prohibited
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
throw NotEarlyError; throw NotEarlyError;
for (var [a] = 0 in {}); for (var [a] = 0 in {});

View File

@ -4,7 +4,9 @@
esid: sec-initializers-in-forin-statement-heads esid: sec-initializers-in-forin-statement-heads
description: > description: >
for-in initializers with ObjectBindingPattern are always prohibited for-in initializers with ObjectBindingPattern are always prohibited
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
throw NotEarlyError; throw NotEarlyError;
for (var {a} = 0 in {}); for (var {a} = 0 in {});

View File

@ -4,11 +4,12 @@
/*--- /*---
es5id: 10.5-1gs es5id: 10.5-1gs
description: Strict Mode - arguments cannot be assigned to in a strict function description: Strict Mode - arguments cannot be assigned to in a strict function
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
throw NotEarlyError;
function f_10_5_1_gs(){ function f_10_5_1_gs(){
arguments = 7; arguments = 7;

View File

@ -5,7 +5,9 @@
info: Check examples for automatic semicolon insertion from the Standart info: Check examples for automatic semicolon insertion from the Standart
es5id: 7.9.2_A1_T1 es5id: 7.9.2_A1_T1
description: "{ 1 2 } 3 is not a valid sentence in the ECMAScript grammar" description: "{ 1 2 } 3 is not a valid sentence in the ECMAScript grammar"
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check examples for automatic semicolon insertion from the Standart info: Check examples for automatic semicolon insertion from the Standart
es5id: 7.9.2_A1_T3 es5id: 7.9.2_A1_T3
description: for( a ; b \n ) is not a valid sentence in the ECMAScript grammar description: for( a ; b \n ) is not a valid sentence in the ECMAScript grammar
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -7,7 +7,9 @@ es5id: 7.9.2_A1_T6
description: > description: >
if(a>b) \n else c=d is not a valid sentence in the ECMAScript if(a>b) \n else c=d is not a valid sentence in the ECMAScript
grammar grammar
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check {} for automatic semicolon insertion info: Check {} for automatic semicolon insertion
es5id: 7.9_A10_T2 es5id: 7.9_A10_T2
description: Checking if execution of "{}*1" fails description: Checking if execution of "{}*1" fails
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check {} for automatic semicolon insertion info: Check {} for automatic semicolon insertion
es5id: 7.9_A10_T4 es5id: 7.9_A10_T4
description: Checking if execution of "({};)*1" fails description: Checking if execution of "({};)*1" fails
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check {} for automatic semicolon insertion info: Check {} for automatic semicolon insertion
es5id: 7.9_A10_T6 es5id: 7.9_A10_T6
description: Checking if execution of "{} \n * 1" fails description: Checking if execution of "{} \n * 1" fails
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check {} for automatic semicolon insertion info: Check {} for automatic semicolon insertion
es5id: 7.9_A10_T8 es5id: 7.9_A10_T8
description: Checking if execution of "{1 2} 3" fails description: Checking if execution of "{1 2} 3" fails
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check If Statement for automatic semicolon insertion info: Check If Statement for automatic semicolon insertion
es5id: 7.9_A11_T4 es5id: 7.9_A11_T4
description: Checking if execution of "if (false) x = 1 else x = -1" fails description: Checking if execution of "if (false) x = 1 else x = -1" fails
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check If Statement for automatic semicolon insertion info: Check If Statement for automatic semicolon insertion
es5id: 7.9_A11_T8 es5id: 7.9_A11_T8
description: Use if (false) {x = 1}; \n else x=-1 and check x description: Use if (false) {x = 1}; \n else x=-1 and check x
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check Throw Statement for automatic semicolon insertion info: Check Throw Statement for automatic semicolon insertion
es5id: 7.9_A4 es5id: 7.9_A4
description: Try use Throw \n Expression construction description: Try use Throw \n Expression construction
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check Postfix Increment Operator for automatic semicolon insertion info: Check Postfix Increment Operator for automatic semicolon insertion
es5id: 7.9_A5.1_T1 es5id: 7.9_A5.1_T1
description: Try use Variable \n ++ construction description: Try use Variable \n ++ construction
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check Postfix Decrement Operator for automatic semicolon insertion info: Check Postfix Decrement Operator for automatic semicolon insertion
es5id: 7.9_A5.3_T1 es5id: 7.9_A5.3_T1
description: Try use Variable \n -- construction description: Try use Variable \n -- construction
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -11,7 +11,9 @@ info: >
es5id: 7.9_A5.7_T1 es5id: 7.9_A5.7_T1
description: Try use Variable1 \n ++ \n ++ \n Variable2 construction description: Try use Variable1 \n ++ \n ++ \n Variable2 construction
negative: ReferenceError negative:
phase: early
type: ReferenceError
---*/ ---*/
var x=0, y=0; var x=0, y=0;

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T1 es5id: 7.9_A6.2_T1
description: For header is (semicolon \n) description: For header is (semicolon \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T10 es5id: 7.9_A6.2_T10
description: For header is (\n false \n semicolon) description: For header is (\n false \n semicolon)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T2 es5id: 7.9_A6.2_T2
description: For header is (\n semicolon \n) description: For header is (\n semicolon \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T3 es5id: 7.9_A6.2_T3
description: For header is (\n semicolon) description: For header is (\n semicolon)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T4 es5id: 7.9_A6.2_T4
description: For header is (\n \n semicolon) description: For header is (\n \n semicolon)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T5 es5id: 7.9_A6.2_T5
description: For header is (false semicolon false\n) description: For header is (false semicolon false\n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T6 es5id: 7.9_A6.2_T6
description: For header is (false semicolon \n false) description: For header is (false semicolon \n false)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T7 es5id: 7.9_A6.2_T7
description: For header is (false \n semicolon \n) description: For header is (false \n semicolon \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T8 es5id: 7.9_A6.2_T8
description: For header is (false \n semicolon false \n) description: For header is (false \n semicolon false \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Use one semicolon Use one semicolon
es5id: 7.9_A6.2_T9 es5id: 7.9_A6.2_T9
description: For header is (\n semicolon false) description: For header is (\n semicolon false)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T1 es5id: 7.9_A6.3_T1
description: For header is (\n) description: For header is (\n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T2 es5id: 7.9_A6.3_T2
description: For header is (\n \n) description: For header is (\n \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T3 es5id: 7.9_A6.3_T3
description: For header is (\n \n \n) description: For header is (\n \n \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T4 es5id: 7.9_A6.3_T4
description: For header is (\n false \n) description: For header is (\n false \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T5 es5id: 7.9_A6.3_T5
description: For header is (false \n false \n) description: For header is (false \n false \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T6 es5id: 7.9_A6.3_T6
description: For header is (\n false \n false \n) description: For header is (\n false \n false \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -8,7 +8,9 @@ info: >
Don`t use semicolons Don`t use semicolons
es5id: 7.9_A6.3_T7 es5id: 7.9_A6.3_T7
description: For header is (\n false \n false \n false \n) description: For header is (\n false \n false \n false \n)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -7,7 +7,9 @@ es5id: 7.9_A6.4_T1
description: > description: >
Three semicolons. For header is (false semicolon false semicolon Three semicolons. For header is (false semicolon false semicolon
false semicolon) false semicolon)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -7,7 +7,9 @@ es5id: 7.9_A6.4_T2
description: > description: >
Three semicolons. For header is (false semicolon false two Three semicolons. For header is (false semicolon false two
semicolons false) semicolons false)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check Do-While Statement for automatic semicolon insertion info: Check Do-While Statement for automatic semicolon insertion
es5id: 7.9_A9_T6 es5id: 7.9_A9_T6
description: Execute do \n while(false) description: Execute do \n while(false)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check Do-While Statement for automatic semicolon insertion info: Check Do-While Statement for automatic semicolon insertion
es5id: 7.9_A9_T7 es5id: 7.9_A9_T7
description: Execute do \n\n while(false) description: Execute do \n\n while(false)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@
info: Check Do-While Statement for automatic semicolon insertion info: Check Do-While Statement for automatic semicolon insertion
es5id: 7.9_A9_T8 es5id: 7.9_A9_T8
description: Execute do {}; \n while(false) description: Execute do {}; \n while(false)
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
for declaration: for declaration:
disallow initialization assignment disallow initialization assignment
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
for (let x = 3 in {}) { } for (let x = 3 in {}) { }

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
for declaration: for declaration:
disallow multiple lexical bindings, with and without initializer disallow multiple lexical bindings, with and without initializer
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
for (let x = 3, y in {}) { } for (let x = 3, y in {}) { }

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
for declaration: for declaration:
disallow multiple lexical bindings, with initializer disallow multiple lexical bindings, with initializer
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
for (let x = 3, y = 4 in {}) { } for (let x = 3, y = 4 in {}) { }

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
for declaration: for declaration:
disallow multiple lexical bindings, without and with initializer disallow multiple lexical bindings, without and with initializer
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
for (let x, y = 4 in {}) { } for (let x, y = 4 in {}) { }

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
for declaration: for declaration:
disallow multiple lexical bindings disallow multiple lexical bindings
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
for (let x, y in {}) { } for (let x, y in {}) { }

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
function declarations in statement position in strict mode: function declarations in statement position in strict mode:
do Statement while ( Expression ) do Statement while ( Expression )
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
do function g() {} while (false) do function g() {} while (false)

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
function declarations in statement position in strict mode: function declarations in statement position in strict mode:
for ( ;;) Statement for ( ;;) Statement
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
for (;false;) function g() {} for (;false;) function g() {}

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
function declarations in statement position in strict mode: function declarations in statement position in strict mode:
if ( Expression ) Statement else Statement if ( Expression ) Statement else Statement
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
if (true) {} else function g() {} if (true) {} else function g() {}

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
function declarations in statement position in strict mode: function declarations in statement position in strict mode:
if ( Expression ) Statement if ( Expression ) Statement
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
if (true) function g() {} if (true) function g() {}

View File

@ -5,7 +5,9 @@ es6id: 13.1
description: > description: >
function declarations in statement position in strict mode: function declarations in statement position in strict mode:
while ( Expression ) Statement while ( Expression ) Statement
negative: SyntaxError negative:
phase: early
type: SyntaxError
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
while (false) function g() {} while (false) function g() {}

View File

@ -5,7 +5,9 @@ es6id: B.3.3
description: > description: >
redeclaration within block: redeclaration within block:
attempt to redeclare function declaration with function declaration attempt to redeclare function declaration with function declaration
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
{ function f() {} function f() {} } { function f() {} function f() {} }

View File

@ -5,6 +5,8 @@ es6id: B.3.3
description: > description: >
redeclaration within block: redeclaration within block:
attempt to redeclare function declaration with let attempt to redeclare function declaration with let
negative: SyntaxError negative:
phase: early
type: SyntaxError
---*/ ---*/
{ function f() {} let f; } { function f() {} let f; }

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