mirror of https://github.com/tc39/test262.git
UpdateExpressions: add necessary changes to tests to reflect latest specification.
This commit is contained in:
parent
dab8c8983a
commit
73705f8801
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions-static-semantics-early-errors
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : LeftHandSideExpression --
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression : LeftHandSideExpression --
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
arguments--;
|
|
@ -2,11 +2,21 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.3.2-2-1-s
|
||||
esid: sec-postfix-decrement-operator
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
Strict Mode - SyntaxError is thrown if the identifier 'arguments'
|
||||
appear as a PostfixExpression(arguments--)
|
||||
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. (arguments)
|
||||
info: |
|
||||
|
||||
sec-identifiers-static-semantics-assignmenttargettype
|
||||
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: LeftHandSideExpression --
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : LeftHandSideExpression --
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression : LeftHandSideExpression --
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
eval--;
|
|
@ -2,11 +2,21 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.3.2-2-2-s
|
||||
esid: sec-postfix-decrement-operator
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
Strict Mode - SyntaxError is thrown if the identifier 'eval'
|
||||
appear as a PostfixExpression(eval--)
|
||||
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. (eval)
|
||||
info: |
|
||||
|
||||
sec-identifiers-static-semantics-assignmenttargettype
|
||||
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: LeftHandSideExpression --
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
It is an early Reference Error if IsValidSimpleAssignmentTarget of
|
||||
LeftHandSideExpression is false.
|
||||
es6id: 12.4.1
|
||||
description: Applied to a non-simple assignment target
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
1--;
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions-static-semantics-early-errors
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : LeftHandSideExpression ++
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression : LeftHandSideExpression ++
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
arguments++;
|
|
@ -2,11 +2,17 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.3.1-2-1-s
|
||||
esid: postfix-increment-operator
|
||||
esid: sec-identifiers-static-semantics-assignmenttargettype
|
||||
description: >
|
||||
Strict Mode - SyntaxError is thrown if the identifier 'arguments'
|
||||
appear as a PostfixExpression(arguments++)
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: LeftHandSideExpression ++
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : LeftHandSideExpression ++
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression : LeftHandSideExpression ++
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
eval++;
|
|
@ -2,11 +2,17 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.3.1-2-2-s
|
||||
esid: postfix-increment-operator
|
||||
esid: sec-identifiers-static-semantics-assignmenttargettype
|
||||
description: >
|
||||
Strict Mode - SyntaxError is thrown if the identifier 'eval'
|
||||
appear as a PostfixExpression(eval++)
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: LeftHandSideExpression ++
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
It is an early Reference Error if IsValidSimpleAssignmentTarget of
|
||||
LeftHandSideExpression is false.
|
||||
es6id: 12.4.1
|
||||
description: Applied to a non-simple assignment target
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
1++;
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : -- UnaryExpression
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression -- UnaryExpression
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
--arguments;
|
|
@ -2,9 +2,21 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.4.5-2-2-s
|
||||
esid: sec-prefix-decrement-operator
|
||||
description: Strict Mode - SyntaxError is thrown for --arguments
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (arguments)
|
||||
info: |
|
||||
|
||||
sec-identifiers-static-semantics-assignmenttargettype
|
||||
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: -- UnaryExpression
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : -- UnaryExpression
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression -- UnaryExpression
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
--eval;
|
|
@ -2,9 +2,21 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.4.5-2-1-s
|
||||
esid: sec-prefix-decrement-operator
|
||||
description: Strict Mode - SyntaxError is thrown for --eval
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (eval)
|
||||
info: |
|
||||
|
||||
sec-identifiers-static-semantics-assignmenttargettype
|
||||
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: -- UnaryExpression
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
It is an early Reference Error if IsValidSimpleAssignmentTarget of
|
||||
UnaryExpression is false.
|
||||
es5id: 12.5.1
|
||||
description: Applied to a non-simple assignment target
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
--1;
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : ++ UnaryExpression
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression ++ UnaryExpression
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
++arguments;
|
|
@ -2,9 +2,21 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.4.4-2-2-s
|
||||
esid: sec-prefix-increment-operator
|
||||
description: Strict Mode - SyntaxError is thrown for ++arguments
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (arguments)
|
||||
info: |
|
||||
|
||||
sec-identifiers-static-semantics-assignmenttargettype
|
||||
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: ++ UnaryExpression
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval)
|
||||
info: |
|
||||
|
||||
sec-update-expressions-static-semantics-assignmenttargettype
|
||||
|
||||
UpdateExpression : ++ UnaryExpression
|
||||
|
||||
Return invalid.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression ++ UnaryExpression
|
||||
|
||||
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
|
||||
|
||||
flags: [noStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
++eval;
|
|
@ -2,9 +2,21 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.4.4-2-1-s
|
||||
esid: sec-prefix-increment-operator
|
||||
description: Strict Mode - SyntaxError is thrown for ++eval
|
||||
esid: sec-update-expressions
|
||||
description: >
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (eval)
|
||||
info: |
|
||||
|
||||
sec-identifiers-static-semantics-assignmenttargettype
|
||||
|
||||
If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
|
||||
|
||||
sec-update-expressions-static-semantics-early-errors
|
||||
|
||||
UpdateExpression: ++ UnaryExpression
|
||||
|
||||
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
|
||||
|
||||
flags: [onlyStrict]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
It is an early Reference Error if IsValidSimpleAssignmentTarget of
|
||||
UnaryExpression is false.
|
||||
es6id: 12.5.1
|
||||
description: Applied to a non-simple assignment target
|
||||
negative:
|
||||
phase: parse
|
||||
type: ReferenceError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
++1;
|
Loading…
Reference in New Issue