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
Showing
with 121 additions and 16 deletions
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
// 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.
/*--- /*---
info: The "const" token can not be used as identifier esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.6 es5id: 7.6.1.2_A1.6
description: Checking if execution of "const=1" fails description: Checking if execution of "const=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: negative:
phase: early phase: early
type: SyntaxError type: SyntaxError
......
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
// 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.
/*--- /*---
info: The "debugger" token can not be used as identifier esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.7 es5id: 7.6.1.2_A1.7
description: Checking if execution of "debugger=1" fails description: Checking if execution of "debugger=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: negative:
phase: early phase: early
type: SyntaxError type: SyntaxError
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
// 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.
/*--- /*---
info: The "double" token can be used as identifier esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.8 es5id: 7.6.1.2_A1.8
description: Checking if execution of "double=1" succeeds description: Checking if execution of "double=1" succeeds
info: >
`double` was removed from the list of future reserved words in ECMAScript 5.
---*/ ---*/
var double = 1; var double = 1;
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
// 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.
/*--- /*---
info: The "enum" token can not be used as identifier esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.9 es5id: 7.6.1.2_A1.9
description: Checking if execution of "enum=1" fails description: Checking if execution of "enum=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: negative:
phase: early phase: early
type: SyntaxError type: SyntaxError
......
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
// 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.
/*--- /*---
info: The "export" token can not be used as identifier esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.10 es5id: 7.6.1.2_A1.10
description: Checking if execution of "export=1" fails description: Checking if execution of "export=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: negative:
phase: early phase: early
type: SyntaxError type: SyntaxError
......
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
// 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.
/*--- /*---
info: The "extends" token can not be used as identifier esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.11 es5id: 7.6.1.2_A1.11
description: Checking if execution of "extends=1" fails description: Checking if execution of "extends=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: negative:
phase: early phase: early
type: SyntaxError type: SyntaxError
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
// 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.
/*--- /*---
info: The "final" token can be used as identifier esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.12 es5id: 7.6.1.2_A1.12
description: Checking if execution of "final=1" succeeds description: Checking if execution of "final=1" succeeds
info: >
`final` was removed from the list of future reserved words in ECMAScript 5.
---*/ ---*/
var final = 1; var final = 1;
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
// 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.
/*--- /*---
info: The "float" token can be used as identifier esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.13 es5id: 7.6.1.2_A1.13
description: Checking if execution of "float=1" succeeds description: Checking if execution of "float=1" succeeds
info: >
`float` was removed from the list of future reserved words in ECMAScript 5.
---*/ ---*/
var float = 1; var float = 1;
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
// 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.
/*--- /*---
info: The "goto" token can be used as identifier esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.14 es5id: 7.6.1.2_A1.14
description: Checking if execution of "goto=1" succeeds description: Checking if execution of "goto=1" succeeds
info: >
`goto` was removed from the list of future reserved words in ECMAScript 5.
---*/ ---*/
var goto = 1; var goto = 1;
...@@ -7,6 +7,6 @@ description: > ...@@ -7,6 +7,6 @@ description: >
SyntaxError isn't thrown when 'implement' occurs SyntaxError isn't thrown when 'implement' occurs
---*/ ---*/
var implement = 1; var implement = 1;
assert.sameValue(implement, 1, 'implement'); assert.sameValue(implement, 1, 'implement');
...@@ -2,14 +2,21 @@ ...@@ -2,14 +2,21 @@
// 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.
/*--- /*---
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1-17-s es5id: 7.6.1-17-s
description: > description: >
7.6 - SyntaxError expected: reserved words used as Identifier 7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: implements (implements) Names in UTF8: implements (implements)
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] flags: [onlyStrict]
---*/ ---*/
var \u0069mplements = 123;
assert.throws(SyntaxError, function() {
eval("var \u0069mplements = 123;");
});
// 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-1-s
description: >
Strict Mode - SyntaxError is thrown when 'implements' 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 implements = 1;
...@@ -7,6 +7,6 @@ description: > ...@@ -7,6 +7,6 @@ description: >
SyntaxError isn't thrown when 'Implements' occurs SyntaxError isn't thrown when 'Implements' occurs
---*/ ---*/
var Implements = 1; var Implements = 1;
assert.sameValue(Implements, 1, 'Implements'); assert.sameValue(Implements, 1, 'Implements');
...@@ -7,6 +7,6 @@ description: > ...@@ -7,6 +7,6 @@ description: >
SyntaxError isn't thrown when 'IMPLEMENTS' occurs SyntaxError isn't thrown when 'IMPLEMENTS' occurs
---*/ ---*/
var IMPLEMENTS = 1; var IMPLEMENTS = 1;
assert.sameValue(IMPLEMENTS, 1, 'IMPLEMENTS'); assert.sameValue(IMPLEMENTS, 1, 'IMPLEMENTS');
...@@ -7,6 +7,6 @@ description: > ...@@ -7,6 +7,6 @@ description: >
SyntaxError isn't thrown when 'implements0' occurs SyntaxError isn't thrown when 'implements0' occurs
---*/ ---*/
var implements0 = 1; var implements0 = 1;
assert.sameValue(implements0, 1, 'implements0'); assert.sameValue(implements0, 1, 'implements0');
...@@ -7,6 +7,6 @@ description: > ...@@ -7,6 +7,6 @@ description: >
SyntaxError isn't thrown when 'implementss' occurs SyntaxError isn't thrown when 'implementss' occurs
---*/ ---*/
var implementss = 1; var implementss = 1;
assert.sameValue(implementss, 1, 'implementss'); assert.sameValue(implementss, 1, 'implementss');
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
// 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.
/*--- /*---
info: The "import" token can not be used as identifier esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.16 es5id: 7.6.1.2_A1.16
description: Checking if execution of "import=1" fails description: Checking if execution of "import=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: negative:
phase: early phase: early
type: SyntaxError type: SyntaxError
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
// 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.
/*--- /*---
info: The "int" token can be used as identifier esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.17 es5id: 7.6.1.2_A1.17
description: Checking if execution of "int=1" succeeds description: Checking if execution of "int=1" succeeds
info: >
`int` was removed from the list of future reserved words in ECMAScript 5.
---*/ ---*/
var int = 1; var int = 1;
...@@ -2,14 +2,21 @@ ...@@ -2,14 +2,21 @@
// 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.
/*--- /*---
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1-22-s es5id: 7.6.1-22-s
description: > description: >
7.6 - SyntaxError expected: reserved words used as Identifier 7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: inte\u0072face (interface) Names in UTF8: inte\u0072face (interface)
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] flags: [onlyStrict]
---*/ ---*/
var inte\u0072face = 123;
assert.throws(SyntaxError, function() {
eval("var inte\u0072face = 123;");
});
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