Skip to content
Snippets Groups Projects
Commit 4494db10 authored by André Bargull's avatar André Bargull
Browse files

Rename and update assignment early error tests

parent 4d95f88c
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,20 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: PutValue operates only on references (see step 1).
esid: sec-assignment-operators-static-semantics-early-errors
es5id: 11.13.1-1-3
description: >
simple assignment throws ReferenceError if LeftHandSide is not a
reference (boolean)
---*/
info: |
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
It is an early Reference Error if LeftHandSideExpression is neither an
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
LeftHandSideExpression is false.
negative:
phase: early
type: ReferenceError
---*/
assert.throws(ReferenceError, function() {
eval("true = 42");
});
true = 42;
......@@ -2,14 +2,20 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: PutValue operates only on references (see step 1).
esid: sec-assignment-operators-static-semantics-early-errors
es5id: 11.13.1-1-4
description: >
simple assignment throws ReferenceError if LeftHandSide is not a
reference (null)
---*/
info: |
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
It is an early Reference Error if LeftHandSideExpression is neither an
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
LeftHandSideExpression is false.
negative:
phase: early
type: ReferenceError
---*/
assert.throws(ReferenceError, function() {
eval("null = 42");
});
null = 42;
......@@ -2,14 +2,20 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: PutValue operates only on references (see step 1)
esid: sec-assignment-operators-static-semantics-early-errors
es5id: 11.13.1-1-1
description: >
simple assignment throws ReferenceError if LeftHandSide is not a
reference (number)
---*/
info: |
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
It is an early Reference Error if LeftHandSideExpression is neither an
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
LeftHandSideExpression is false.
negative:
phase: early
type: ReferenceError
---*/
assert.throws(ReferenceError, function() {
eval("42 = 42");
});
42 = 42;
......@@ -2,14 +2,20 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: PutValue operates only on references (see step 1).
esid: sec-assignment-operators-static-semantics-early-errors
es5id: 11.13.1-1-2
description: >
simple assignment throws ReferenceError if LeftHandSide is not a
reference (string)
---*/
info: |
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
It is an early Reference Error if LeftHandSideExpression is neither an
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
LeftHandSideExpression is false.
negative:
phase: early
type: ReferenceError
---*/
assert.throws(ReferenceError, function() {
eval("'x' = 42");
});
'x' = 42;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment