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 268 additions and 3 deletions
// 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-6-s
description: >
Strict Mode - SyntaxError is thrown when 'interface' 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 interface = 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-18-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: l\u0065t (let)
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 l\u0065t = 123;");
});
var l\u0065t = 123;
......@@ -2,14 +2,20 @@
// 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-2-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord 'let'
occurs in strict mode code
Strict Mode - SyntaxError is thrown when 'let' 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]
---*/
assert.throws(SyntaxError, function() {
eval("var let = 1;");
});
var let = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "long" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.19
description: Checking if execution of "long=1" succeeds
info: >
`long` was removed from the list of future reserved words in ECMAScript 5.
---*/
var long = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "native" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.20
description: Checking if execution of "native=1" succeeds
info: >
`native` was removed from the list of future reserved words in ECMAScript 5.
---*/
var native = 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-23-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: packag\u0065 (package)
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 packag\u0065 = 123;");
});
var packag\u0065 = 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-7-s
description: >
Strict Mode - SyntaxError is thrown when 'package' 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 package = 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-19-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: privat\u0065 (private)
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 privat\u0065 = 123;");
});
var privat\u0065 = 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-3-s
description: >
Strict Mode - SyntaxError is thrown when 'private' 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 private = 1;
......@@ -2,15 +2,22 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1-24-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8:
\u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected)
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 \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 123;");
});
var \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 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-8-s
description: >
Strict Mode - SyntaxError is thrown when 'protected' 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 protected = 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-20-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public)
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 \u0070\u0075\u0062\u006c\u0069\u0063 = 123;");
});
var \u0070\u0075\u0062\u006c\u0069\u0063 = 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-4-s
description: >
Strict Mode - SyntaxError is thrown when 'public' 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 public = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "short" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.25
description: Checking if execution of "short=1" succeeds
info: >
`short` was removed from the list of future reserved words in ECMAScript 5.
---*/
var short = 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-25-s
description: >
7.6 - SyntaxError expected: reserved words used as Identifier
Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static)
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 \u0073\u0074\u0061\u0074\u0069\u0063 = 123;");
});
var \u0073\u0074\u0061\u0074\u0069\u0063 = 123;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment