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

Rename and consolidate tests in future-reserved-words directory

parent d23063c7
No related branches found
No related tags found
No related merge requests found
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2-9-s
description: >
Strict Mode - SyntaxError is thrown when 'static' occurs in strict mode code
info: |
Identifier : IdentifierName but not ReservedWord
It is a Syntax Error if this phrase is contained in strict mode code and the
StringValue of IdentifierName is: "implements", "interface", "let", "package",
"private", "protected", "public", "static", or "yield".
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var static = 1;
......@@ -2,9 +2,14 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "super" token can not be used as identifier
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.27
description: Checking if execution of "super=1" fails
info: |
Identifier : IdentifierName but not ReservedWord
It is a Syntax Error if StringValue of IdentifierName is the same String
value as the StringValue of any ReservedWord except for yield and await.
negative:
phase: early
type: SyntaxError
......
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "synchronized" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.28
description: Checking if execution of "synchronized=1" succeeds
info: >
`synchronized` was removed from the list of future reserved words in ECMAScript 5.
---*/
var synchronized = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "throws" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.29
description: Checking if execution of "throws=1" succeeds
info: >
`throws` was removed from the list of future reserved words in ECMAScript 5.
---*/
var throws = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "transient" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.30
description: Checking if execution of "transient=1" succeeds
info: >
`transient` was removed from the list of future reserved words in ECMAScript 5.
---*/
var transient = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "volatile" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.31
description: Checking if execution of "volatile=1" succeeds
info: >
`volatile` was removed from the list of future reserved words in ECMAScript 5.
---*/
var volatile = 1;
......@@ -2,14 +2,21 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1-21-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: \u0079ield (yield)
info: |
Identifier : IdentifierName but not ReservedWord
It is a Syntax Error if this phrase is contained in strict mode code and the
StringValue of IdentifierName is: "implements", "interface", "let", "package",
"private", "protected", "public", "static", or "yield".
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var \u0079ield = 123;");
});
var \u0079ield = 123;
......@@ -2,14 +2,19 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2-5-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
Strict Mode - SyntaxError is thrown when ReservedWord
'yield' occurs in strict mode code
info: |
BindingIdentifier : yield
It is a Syntax Error if the code matched by this production is contained in strict mode code.
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var yield = 1;")
});
var yield = 1;
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