mirror of https://github.com/tc39/test262.git
Replace runTestCase with assert helpers [test/language/reserved-words]
This commit is contained in:
parent
ba1b02a047
commit
2fe6cac16a
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-1
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
null: 0,
|
||||
true: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-10
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
in: 0,
|
||||
try: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-11
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
enum: 0,
|
||||
extends: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-12
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
const: 0,
|
||||
export: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-13
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: implements, let, private
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
implements: 0,
|
||||
let: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-14
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: public, yield, interface
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
public: 0,
|
||||
yield: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-15
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: package, protected, static
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
package: 0,
|
||||
protected: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-16
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: undeefined, NaN, Infinity
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
undefined: 0,
|
||||
NaN: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-2
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: break, case, do
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
break: 0,
|
||||
case: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-3
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: instanceof, typeof, else
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
instanceof: 0,
|
||||
typeof: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-4
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: new, var, catch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
new: 0,
|
||||
var: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-5
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: finally, return, void
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
finally: 0,
|
||||
return: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-6
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: continue, for, switch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
continue: 0,
|
||||
for: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-7
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: while, debugger, function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
while: 0,
|
||||
debugger: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-8
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: this, with, default
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
this: 0,
|
||||
with: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-1-9
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
verified with hasOwnProperty: if, throw, delete
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase(){
|
||||
var tokenCodes = {
|
||||
if: 0,
|
||||
throw: 1,
|
||||
|
@ -23,12 +21,7 @@ function testcase(){
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-1
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.null = 0;
|
||||
tokenCodes.true = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-10
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.in = 0;
|
||||
tokenCodes.try = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-11
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.enum = 0;
|
||||
tokenCodes.extends = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-12
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.const = 0;
|
||||
tokenCodes.export = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-13
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: implements, let, private
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.implements = 0;
|
||||
tokenCodes.let = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-14
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: public, yield, interface
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.public = 0;
|
||||
tokenCodes.yield = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-15
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: package, protected, static
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.package = 0;
|
||||
tokenCodes.protected = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-16
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: undefined, NaN, Infinity
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.undefined = 0;
|
||||
tokenCodes.NaN = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-2
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: break, case, do
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.break = 0;
|
||||
tokenCodes.case = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-3
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: instanceof, typeof, else
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.instanceof = 0;
|
||||
tokenCodes.typeof = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-4
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: new, var, catch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.new = 0;
|
||||
tokenCodes.var = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-5
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: finally, return, void
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.finally = 0;
|
||||
tokenCodes.return = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-6
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: continue, for, switch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.continue = 0;
|
||||
tokenCodes.for = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-7
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: while, debugger, function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.while = 0;
|
||||
tokenCodes.debugger = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-8
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: this, with, default
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.this = 0;
|
||||
tokenCodes.with = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-2-9
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
verified with hasOwnProperty: if, throw, delete
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.if = 0;
|
||||
tokenCodes.throw = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-1
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['null'] = 0;
|
||||
tokenCodes['true'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-10
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['in'] = 0;
|
||||
tokenCodes['try'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-11
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['enum'] = 0;
|
||||
tokenCodes['extends'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-12
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['const'] = 0;
|
||||
tokenCodes['export'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-13
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: implements, let, private
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['implements'] = 0;
|
||||
tokenCodes['let'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-14
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: public, yield, interface
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['public'] = 0;
|
||||
tokenCodes['yield'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-15
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: package, protected, static
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['package'] = 0;
|
||||
tokenCodes['protected'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-16
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: undefined, NaN, Infinity
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['undefined'] = 0;
|
||||
tokenCodes['NaN'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-2
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: break, case, do
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['break'] = 0;
|
||||
tokenCodes['case'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-3
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: instanceof, typeof, else
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['instanceof'] = 0;
|
||||
tokenCodes['typeof'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-4
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: new, var, catch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['new'] = 0;
|
||||
tokenCodes['var'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-5
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: finally, return, void
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['finally'] = 0;
|
||||
tokenCodes['return'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-6
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: continue, for, switch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['continue'] = 0;
|
||||
tokenCodes['for'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-7
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: while, debugger, function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['while'] = 0;
|
||||
tokenCodes['debugger'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-8
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: this, with, default
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['this'] = 0;
|
||||
tokenCodes['with'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-3-9
|
|||
description: >
|
||||
Allow reserved words as property names by index
|
||||
assignment,verified with hasOwnProperty: if, throw, delete
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['if'] = 0;
|
||||
tokenCodes['throw'] = 1;
|
||||
|
@ -22,12 +20,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-1
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set null(value) {
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-10
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set in(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-11
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set enum(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-12
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set const(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-13
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: implements, let, private
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set implements(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-14
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: public, yield, interface
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set public(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-15
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: package, protected, static
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set package(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-16
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: undefined, NaN, Infinity
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set undefined(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-2
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: break, case, do
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set break(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-3
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: instanceof, typeof, else
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set instanceof(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-4
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: new, var, catch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set new(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-5
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: finally, return, void
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set finally(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-6
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: continue, for, switch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set continue(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-7
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: while, debugger, function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set while(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-8
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: this, with, default
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set this(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-4-9
|
|||
description: >
|
||||
Allow reserved words as property names by set function within an
|
||||
object, verified with hasOwnProperty: if, throw, delete
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var test0 = 0, test1 = 1, test2 = 2;
|
||||
var tokenCodes = {
|
||||
set if(value){
|
||||
|
@ -39,12 +37,7 @@ function testcase() {
|
|||
for(var p in tokenCodes) {
|
||||
for(var p1 in arr) {
|
||||
if(arr[p1] === p) {
|
||||
if(!tokenCodes.hasOwnProperty(arr[p1])) {
|
||||
return false;
|
||||
};
|
||||
assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true');
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-1
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
null: 0,
|
||||
true: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'false'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-10
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
in: 0,
|
||||
try: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'class'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-11
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
enum: 0,
|
||||
extends: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'super'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-12
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
const : 0,
|
||||
export: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'import'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-13
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: implements, let, private
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
implements: 0,
|
||||
let: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'private'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-14
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: public, yield, interface
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
public: 0,
|
||||
yield: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'interface'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-15
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: package, protected, static
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
package: 0,
|
||||
protected: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'static'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-16
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: undefined, NaN, Infinity
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
undefined: 0,
|
||||
NaN: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'Infinity'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-2
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: break, case, do
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
break: 0,
|
||||
case: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'do'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-3
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: instanceof, typeof, else
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
instanceof: 0,
|
||||
typeof: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'else'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-4
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: new, var, catch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
new: 0,
|
||||
var: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'catch'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-5
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: finally, return, void
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
finally: 0,
|
||||
return: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'void'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-6
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: continue, for, switch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
continue: 0,
|
||||
for: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'switch'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-7
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: while, debugger, function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
while: 0,
|
||||
debugger: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'function'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-8
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: this, with, default
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
this: 0,
|
||||
with: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'default'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-5-9
|
|||
description: >
|
||||
Allow reserved words as property names at object initialization,
|
||||
accessed via indexing: if, throw, delete
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {
|
||||
if: 0,
|
||||
throw: 1,
|
||||
|
@ -21,10 +19,5 @@ function testcase() {
|
|||
'delete'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-1
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.null = 0;
|
||||
tokenCodes.true = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'false'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-10
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.in = 0;
|
||||
tokenCodes.try = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'class'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-11
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.enum = 0;
|
||||
tokenCodes.extends = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'super'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-12
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.const = 0;
|
||||
tokenCodes.export = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'import'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-13
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: implements, let, private
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.implements = 0;
|
||||
tokenCodes.let = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'private'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-14
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: public, yield, interface
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.public = 0;
|
||||
tokenCodes.yield = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'interface'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-15
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: package, protected, static
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.package = 0;
|
||||
tokenCodes.protected = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'static'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-16
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: undefined, NaN, Infinity
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.undefined = 0;
|
||||
tokenCodes.NaN = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'Infinity'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-2
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: break, case, do
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.break = 0;
|
||||
tokenCodes.case = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'do'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-3
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: instanceof, typeof, else
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.instanceof = 0;
|
||||
tokenCodes.typeof = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'else'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-4
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: new, var, catch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.new = 0;
|
||||
tokenCodes.var = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'catch'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-5
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: finally, return, void
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.finally = 0;
|
||||
tokenCodes.return = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'void'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-6
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: continue, for, switch
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.continue = 0;
|
||||
tokenCodes.for = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'switch'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-7
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: while, debugger, function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.while = 0;
|
||||
tokenCodes.debugger = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'function'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-8
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: this, with, default
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.this = 0;
|
||||
tokenCodes.with = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'default'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-6-9
|
|||
description: >
|
||||
Allow reserved words as property names by dot operator assignment,
|
||||
accessed via indexing: if, throw, delete
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes.if = 0;
|
||||
tokenCodes.throw = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'delete'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-7-1
|
|||
description: >
|
||||
Allow reserved words as property names by index assignment,
|
||||
accessed via indexing: null, true, false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['null'] = 0;
|
||||
tokenCodes['true'] = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'false'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-7-10
|
|||
description: >
|
||||
Allow reserved words as property names by index assignment,
|
||||
accessed via indexing: in, try, class
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['in'] = 0;
|
||||
tokenCodes['try'] = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'class'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-7-11
|
|||
description: >
|
||||
Allow reserved words as property names by index assignment,
|
||||
accessed via indexing: enum, extends, super
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['enum'] = 0;
|
||||
tokenCodes['extends'] = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'super'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 7.6.1-7-12
|
|||
description: >
|
||||
Allow reserved words as property names by index assignment,
|
||||
accessed via indexing: const, export, import
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var tokenCodes = {};
|
||||
tokenCodes['const'] = 0;
|
||||
tokenCodes['export'] = 1;
|
||||
|
@ -20,10 +18,5 @@ function testcase() {
|
|||
'import'
|
||||
];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (tokenCodes[arr[i]] !== i) {
|
||||
return false;
|
||||
};
|
||||
assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue