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

Rename and consolidate tests in reserved-words directory

parent 053d63fd
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 536 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-1-1
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: null, true, false
---*/
var tokenCodes = {
null: 0,
true: 1,
false: 2
};
var arr = [
'null',
'true',
'false'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-10
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: in, try, class
---*/
var tokenCodes = {
in: 0,
try: 1,
class: 2
};
var arr = [
'in',
'try',
'class'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-11
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: enum, extends, super
---*/
var tokenCodes = {
enum: 0,
extends: 1,
super: 2
};
var arr = [
'enum',
'extends',
'super'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-12
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: const, export, import
---*/
var tokenCodes = {
const: 0,
export: 1,
import: 2
};
var arr = [
'const',
'export',
'import'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-13
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: implements, let, private
---*/
var tokenCodes = {
implements: 0,
let: 1,
private: 2
};
var arr = [
'implements',
'let',
'private'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-14
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: public, yield, interface
---*/
var tokenCodes = {
public: 0,
yield: 1,
interface: 2
};
var arr = [
'public',
'yield',
'interface'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-15
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: package, protected, static
---*/
var tokenCodes = {
package: 0,
protected: 1,
static: 2
};
var arr = [
'package',
'protected',
'static'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-16
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: undeefined, NaN, Infinity
---*/
var tokenCodes = {
undefined: 0,
NaN: 1,
Infinity: 2
};
var arr = [
'undefined',
'NaN',
'Infinity'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-2
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: break, case, do
---*/
var tokenCodes = {
break: 0,
case: 1,
do: 2
};
var arr = [
'break',
'case',
'do'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-3
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: instanceof, typeof, else
---*/
var tokenCodes = {
instanceof: 0,
typeof: 1,
else: 2
};
var arr = [
'instanceof',
'typeof',
'else'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-4
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: new, var, catch
---*/
var tokenCodes = {
new: 0,
var: 1,
catch: 2
};
var arr = [
'new',
'var',
'catch'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-5
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: finally, return, void
---*/
var tokenCodes = {
finally: 0,
return: 1,
void: 2
};
var arr = [
'finally',
'return',
'void'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-6
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: continue, for, switch
---*/
var tokenCodes = {
continue: 0,
for: 1,
switch: 2
};
var arr = [
'continue',
'for',
'switch'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-7
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: while, debugger, function
---*/
var tokenCodes = {
while: 0,
debugger: 1,
function: 2
};
var arr = [
'while' ,
'debugger',
'function'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-8
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: this, with, default
---*/
var tokenCodes = {
this: 0,
with: 1,
default: 2
};
var arr = [
'this',
'with',
'default'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-1-9
description: >
Allow reserved words as property names at object initialization,
verified with hasOwnProperty: if, throw, delete
---*/
var tokenCodes = {
if: 0,
throw: 1,
delete: 2
};
var arr = [
'if',
'throw',
'delete'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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
description: >
Allow reserved words as property names by dot operator assignment,
verified with hasOwnProperty: null, true, false
---*/
var tokenCodes = {};
tokenCodes.null = 0;
tokenCodes.true = 1;
tokenCodes.false = 2;
var arr = [
'null',
'true',
'false'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-10
description: >
Allow reserved words as property names by dot operator assignment,
verified with hasOwnProperty: in, try, class
---*/
var tokenCodes = {};
tokenCodes.in = 0;
tokenCodes.try = 1;
tokenCodes.class = 2;
var arr = [
'in',
'try',
'class'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-11
description: >
Allow reserved words as property names by dot operator assignment,
verified with hasOwnProperty: enum, extends, super
---*/
var tokenCodes = {};
tokenCodes.enum = 0;
tokenCodes.extends = 1;
tokenCodes.super = 2;
var arr = [
'enum',
'extends',
'super'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
// 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-12
description: >
Allow reserved words as property names by dot operator assignment,
verified with hasOwnProperty: const, export, import
---*/
var tokenCodes = {};
tokenCodes.const = 0;
tokenCodes.export = 1;
tokenCodes.import = 2;
var arr = [
'const',
'export',
'import'
];
for(var p in tokenCodes) {
for(var p1 in arr) {
if(arr[p1] === p) {
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
}
}
}
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