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 19 additions and 209 deletions
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-1-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'implements' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var implements = 1;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-3-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'private' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var private = 1;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-4-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'public' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var public = 1;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-6-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'interface' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var interface = 1;")
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-7-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'package' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var package = 1;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-8-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'protected' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var protected = 1;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.6.1.2-9-s
description: >
Strict Mode - SyntaxError is thrown when FutureReservedWord
'static' occurs in strict mode code
flags: [onlyStrict]
---*/
assert.throws(SyntaxError, function() {
eval("var static = 1;");
});
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "implements" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.15
description: Checking if execution of "implements=1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var implements = 1;
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "interface" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.18
description: Checking if execution of "interface = 1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var interface = 1;
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "package" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.21
description: Checking if execution of "package=1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var package = 1;
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "private" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.22
description: Checking if execution of "private=1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var private = 1;
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "protected" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.23
description: Checking if execution of "protected=1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var protected = 1;
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "public" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.24
description: Checking if execution of "public=1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var public = 1;
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "static" token can not be used as identifier in strict code
es5id: 7.6.1.2_A1.26
description: Checking if execution of "static=1" fails in strict code
negative:
phase: early
type: SyntaxError
flags: [onlyStrict]
---*/
var static = 1;
......@@ -7,6 +7,6 @@ description: >
SyntaxError isn't thrown when '_implements' occurs
---*/
var _implements = 1;
var _implements = 1;
assert.sameValue(_implements, 1, '_implements');
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "abstract" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.1
description: Checking if execution of "abstract=1" succeeds
info: >
`abstract` was removed from the list of future reserved words in ECMAScript 5.
---*/
var abstract = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "boolean" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.2
description: Checking if execution of "boolean=1" succeeds
info: >
`boolean` was removed from the list of future reserved words in ECMAScript 5.
---*/
var boolean = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "byte" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.3
description: Checking if execution of "byte=1" succeeds
info: >
`byte` was removed from the list of future reserved words in ECMAScript 5.
---*/
var byte = 1;
......@@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "char" token can be used as identifier
esid: sec-future-reserved-words
es5id: 7.6.1.2_A1.4
description: Checking if execution of "char=1" succeeds
info: >
`char` was removed from the list of future reserved words in ECMAScript 5.
---*/
var char = 1;
......@@ -2,9 +2,14 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The "class" token can not be used as identifier
esid: sec-identifiers-static-semantics-early-errors
es5id: 7.6.1.2_A1.5
description: Checking if execution of "class=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
......
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