Merge pull request #264 from anba/issue-35/language-non-eval

Fix strict mode errors in language
This commit is contained in:
Brian Terlson 2015-05-13 14:19:32 -07:00
commit 106b935f17
59 changed files with 353 additions and 41 deletions

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-10-c-ii-1 es5id: 10.6-10-c-ii-1
description: arguments[i] change with actual parameters description: arguments[i] change with actual parameters
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-10-c-ii-2 es5id: 10.6-10-c-ii-2
description: arguments[i] map to actual parameter description: arguments[i] map to actual parameter
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-12-1 es5id: 10.6-12-1
description: Accessing callee property of Arguments object is allowed description: Accessing callee property of Arguments object is allowed
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-12-2 es5id: 10.6-12-2
description: arguments.callee has correct attributes description: arguments.callee has correct attributes
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-13-1 es5id: 10.6-13-1
description: Accessing caller property of Arguments object is allowed description: Accessing caller property of Arguments object is allowed
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -9,6 +9,7 @@ es5id: 10.6-13-a-1
description: > description: >
In non-strict mode, arguments object should have its own 'callee' In non-strict mode, arguments object should have its own 'callee'
property defined (Step 13.a) property defined (Step 13.a)
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-13-a-2 es5id: 10.6-13-a-2
description: A direct call to arguments.callee.caller should work description: A direct call to arguments.callee.caller should work
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@
/*--- /*---
es5id: 10.6-13-a-3 es5id: 10.6-13-a-3
description: An indirect call to arguments.callee.caller should work description: An indirect call to arguments.callee.caller should work
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -0,0 +1,20 @@
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this notice and otherwise comply with the Use Terms.
/*---
es5id: 10.6-6-3
description: >
'length' property of arguments object for 0 argument function
exists
flags: [onlyStrict]
includes: [runTestCase.js]
---*/
function testcase() {
'use strict';
return (function () {return arguments.length !== undefined})();
}
runTestCase(testcase);

View File

@ -9,6 +9,7 @@ es5id: 10.6-6-3
description: > description: >
'length' property of arguments object for 0 argument function 'length' property of arguments object for 0 argument function
exists exists
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -0,0 +1,20 @@
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this notice and otherwise comply with the Use Terms.
/*---
es5id: 10.6-6-4
description: >
'length' property of arguments object for 0 argument function call
is 0 even with formal parameters
flags: [onlyStrict]
includes: [runTestCase.js]
---*/
function testcase() {
'use strict';
return (function (a,b,c) {return arguments.length === 0})();
}
runTestCase(testcase);

View File

@ -9,6 +9,7 @@ es5id: 10.6-6-4
description: > description: >
'length' property of arguments object for 0 argument function call 'length' property of arguments object for 0 argument function call
is 0 even with formal parameters is 0 even with formal parameters
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -12,8 +12,6 @@ includes: [runTestCase.js]
var __10_4_2_1_1_1 = "str"; var __10_4_2_1_1_1 = "str";
function testcase() { function testcase() {
try {
var _eval = eval; var _eval = eval;
var __10_4_2_1_1_1 = "str1"; var __10_4_2_1_1_1 = "str1";
if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval
@ -21,8 +19,5 @@ function testcase() {
return true; return true;
} }
return false; return false;
} finally {
delete this.__10_4_2_1_1_1;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -14,8 +14,6 @@ includes: [runTestCase.js]
var __10_4_2_1_2 = "str"; var __10_4_2_1_2 = "str";
function testcase() { function testcase() {
try {
var _eval = eval; var _eval = eval;
var __10_4_2_1_2 = "str1"; var __10_4_2_1_2 = "str1";
function foo() { function foo() {
@ -28,8 +26,5 @@ function testcase() {
} }
} }
return foo(); return foo();
} finally {
delete this.__10_4_2_1_1_2;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -14,9 +14,6 @@ includes: [runTestCase.js]
var __10_4_2_1_3 = "str"; var __10_4_2_1_3 = "str";
function testcase() { function testcase() {
try {
var _eval = eval; var _eval = eval;
var __10_4_2_1_3 = "str1"; var __10_4_2_1_3 = "str1";
try { try {
@ -31,8 +28,5 @@ function testcase() {
return false; return false;
} }
} }
} finally {
delete this.__10_4_2_1_3;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -9,12 +9,12 @@ es5id: 10.4.2-1-4
description: > description: >
Indirect call to eval has context set to global context (with Indirect call to eval has context set to global context (with
block) block)
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
var __10_4_2_1_4 = "str"; var __10_4_2_1_4 = "str";
function testcase() { function testcase() {
try {
var o = new Object(); var o = new Object();
o.__10_4_2_1_4 = "str2"; o.__10_4_2_1_4 = "str2";
var _eval = eval; var _eval = eval;
@ -26,8 +26,5 @@ function testcase() {
} }
} }
return false; return false;
} finally {
delete this.__10_4_2_1_4;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -14,8 +14,6 @@ includes: [runTestCase.js]
var __10_4_2_1_5 = "str"; var __10_4_2_1_5 = "str";
function testcase() { function testcase() {
try {
var __10_4_2_1_5 = "str1"; var __10_4_2_1_5 = "str1";
var r = eval("\ var r = eval("\
var _eval = eval; \ var _eval = eval; \
@ -24,8 +22,5 @@ function testcase() {
eval(\"\'str2\' === __10_4_2_1_5\")\ eval(\"\'str2\' === __10_4_2_1_5\")\
"); ");
return r; return r;
} finally {
delete this.__10_4_2_1_5;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -9,6 +9,7 @@ es5id: 10.4.2-2-c-1
description: > description: >
Direct val code in non-strict mode - can instantiate variable in Direct val code in non-strict mode - can instantiate variable in
calling context calling context
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T1 es5id: 10.4.2_A1.1_T1
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T10 es5id: 10.4.2_A1.1_T10
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T11 es5id: 10.4.2_A1.1_T11
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -0,0 +1,28 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T12
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
var x = 1;
var y = 2;

View File

@ -0,0 +1,27 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T13
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
this.x = 1;
this.y = 2;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}

View File

@ -0,0 +1,28 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T14
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
var x = 1;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
var y = 2;

View File

@ -0,0 +1,28 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T15
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
this.x = 1;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
this.y = 2;

View File

@ -0,0 +1,28 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T16
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
var x = 1;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
this.y = 2;

View File

@ -0,0 +1,28 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T17
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
this.x = 1;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
var y = 2;

View File

@ -0,0 +1,27 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T18
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
var x = 1;
var y = 2;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}

View File

@ -0,0 +1,28 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The scope chain is initialised to contain the same objects,
in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T19
description: eval within global execution context
---*/
var i;
var j;
var str1 = '';
var str2 = '';
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
if(!(str1 === str2)){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
this.x = 1;
this.y = 2;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T2 es5id: 10.4.2_A1.1_T2
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T3 es5id: 10.4.2_A1.1_T3
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T4 es5id: 10.4.2_A1.1_T4
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T5 es5id: 10.4.2_A1.1_T5
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T6 es5id: 10.4.2_A1.1_T6
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T7 es5id: 10.4.2_A1.1_T7
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T8 es5id: 10.4.2_A1.1_T8
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.1_T9 es5id: 10.4.2_A1.1_T9
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
var i; var i;

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T1 es5id: 10.4.2_A1.2_T1
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T10 es5id: 10.4.2_A1.2_T10
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T2 es5id: 10.4.2_A1.2_T2
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T3 es5id: 10.4.2_A1.2_T3
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T4 es5id: 10.4.2_A1.2_T4
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T5 es5id: 10.4.2_A1.2_T5
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T6 es5id: 10.4.2_A1.2_T6
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T7 es5id: 10.4.2_A1.2_T7
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T8 es5id: 10.4.2_A1.2_T8
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -7,6 +7,7 @@ info: >
in the same order, as the calling context's scope chain in the same order, as the calling context's scope chain
es5id: 10.4.2_A1.2_T9 es5id: 10.4.2_A1.2_T9
description: eval within global execution context description: eval within global execution context
flags: [noStrict]
---*/ ---*/
function f(){ function f(){

View File

@ -13,61 +13,61 @@ description: Checking by using eval
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u0009x"), eval("var x = 0; typeof\u0009x"),
"number", "number",
'#1: var x = 0; typeof\\u0009x; x === "number". Actual: ' + (x) '#1: var x = 0; typeof\\u0009x; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u000Bx"), eval("var x = 0; typeof\u000Bx"),
"number", "number",
'#2: var x = 0; typeof\\u000Bx; x === "number". Actual: ' + (x) '#2: var x = 0; typeof\\u000Bx; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u000Cx"), eval("var x = 0; typeof\u000Cx"),
"number", "number",
'#3: var x = 0; typeof\\u000Cx; x === "number". Actual: ' + (x) '#3: var x = 0; typeof\\u000Cx; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u0020x"), eval("var x = 0; typeof\u0020x"),
"number", "number",
'#4: var x = 0; typeof\\u0020x; x === "number". Actual: ' + (x) '#4: var x = 0; typeof\\u0020x; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u00A0x"), eval("var x = 0; typeof\u00A0x"),
"number", "number",
'#5: var x = 0; typeof\\u00A0x; x === "number". Actual: ' + (x) '#5: var x = 0; typeof\\u00A0x; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u000Ax"), eval("var x = 0; typeof\u000Ax"),
"number", "number",
'#6: var x = 0; typeof\\u000Ax; x === "number". Actual: ' + (x) '#6: var x = 0; typeof\\u000Ax; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u000Dx"), eval("var x = 0; typeof\u000Dx"),
"number", "number",
'#7: var x = 0; typeof\\u000Dx; x === "number". Actual: ' + (x) '#7: var x = 0; typeof\\u000Dx; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u2028x"), eval("var x = 0; typeof\u2028x"),
"number", "number",
'#8: var x = 0; typeof\\u2028x; x === "number". Actual: ' + (x) '#8: var x = 0; typeof\\u2028x; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u2029x"), eval("var x = 0; typeof\u2029x"),
"number", "number",
'#9: var x = 0; typeof\\u2029x; x === "number". Actual: ' + (x) '#9: var x = 0; typeof\\u2029x; x === "number".'
); );
assert.sameValue( assert.sameValue(
eval("var x = 0; typeof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x"), eval("var x = 0; typeof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x"),
"number", "number",
'#10: var x = 0; typeof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === "number". Actual: ' + (x) '#10: var x = 0; typeof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === "number".'
); );
assert.sameValue( assert.sameValue(

View File

@ -5,6 +5,7 @@ es6id: 25.2
description: > description: >
The operand to a `yield` expression should honor the semantics of the The operand to a `yield` expression should honor the semantics of the
`with` statement. `with` statement.
flags: [noStrict]
---*/ ---*/
function* g() { function* g() {

View File

@ -12,6 +12,7 @@ es5id: 10.4.3-1-105
description: > description: >
Non strict mode should ToObject thisArg if not an object. Return Non strict mode should ToObject thisArg if not an object. Return
type should be object and strict equality should fail. type should be object and strict equality should fail.
flags: [noStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/

View File

@ -11,6 +11,7 @@ description: >
Creating functions with two or more formal parameters, that have Creating functions with two or more formal parameters, that have
the same name. Calling this function excluding a few last the same name. Calling this function excluding a few last
parameters parameters
flags: [noStrict]
---*/ ---*/
//CHECK#1 //CHECK#1

View File

@ -7,14 +7,16 @@ es5id: 7.7_A1
description: Using all punctuators description: Using all punctuators
---*/ ---*/
this.nan = NaN;
//CHECK#1 //CHECK#1
({});[]; ({});[];
this.NaN; this.nan;
1 < 2 > 3 <= 4 >= 5 == 6 != 7 === 8 !== 9; 1 < 2 > 3 <= 4 >= 5 == 6 != 7 === 8 !== 9;
1 + 2 - 3 * 4 % 5 / 6 << 7 >> 8 >>> 9; 1 + 2 - 3 * 4 % 5 / 6 << 7 >> 8 >>> 9;
this.NaN++; ++this.NaN; this.NaN--; --this.NaN; this.nan++; ++this.nan; this.nan--; --this.nan;
1 & 2 | 3 ^ 4 && !5 || ~6; 1 & 2 | 3 ^ 4 && !5 || ~6;
1 ? 2 : 3; 1 ? 2 : 3;
this.NaN = 1; this.NaN += 2; this.NaN -= 3; this.NaN *= 4; this.NaN /= 5; this.nan = 1; this.nan += 2; this.nan -= 3; this.nan *= 4; this.nan /= 5;
this.NaN %= 6; this.NaN <<= 7; this.NaN >>= 8; this.NaN >>>= 9; this.nan %= 6; this.nan <<= 7; this.nan >>= 8; this.nan >>>= 9;
this.NaN &= 1; this.NaN |= 2; this.NaN ^= 3; this.nan &= 1; this.nan |= 2; this.nan ^= 3;

View File

@ -97,7 +97,7 @@ firstIterResult = new Proxy({}, {
$ERROR('This code is unreachable.'); $ERROR('This code is unreachable.');
} }
}); });
i = 0; var i = 0;
for (var x of iterable) { for (var x of iterable) {
assert.sameValue(x, 23); assert.sameValue(x, 23);
i++; i++;

View File

@ -0,0 +1,10 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Infinity is not a keyword
es5id: 8.5_A10
description: Create variable entitled Infinity
---*/
var Infinity;

View File

@ -5,6 +5,7 @@
info: Infinity is not a keyword info: Infinity is not a keyword
es5id: 8.5_A10 es5id: 8.5_A10
description: Create variable entitled Infinity description: Create variable entitled Infinity
flags: [noStrict]
---*/ ---*/
var Infinity=1.0; var Infinity=1.0;

View File

@ -0,0 +1,10 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: NaN is not a keyword
es5id: 8.5_A4
description: Create variable entitled NaN
---*/
var NaN;

View File

@ -5,6 +5,7 @@
info: NaN is not a keyword info: NaN is not a keyword
es5id: 8.5_A4 es5id: 8.5_A4
description: Create variable entitled NaN description: Create variable entitled NaN
flags: [noStrict]
---*/ ---*/
var NaN=1.0; var NaN=1.0;

View File

@ -0,0 +1,14 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: undefined is not a keyword
es5id: 8.1_A3
description: Create variable named undefined
---*/
//////////////////////////////////////////////////////////
// CHECK1#
var undefined;
//
//////////////////////////////////////////////////////////

View File

@ -5,6 +5,7 @@
info: undefined is not a keyword info: undefined is not a keyword
es5id: 8.1_A3 es5id: 8.1_A3
description: Create variable named undefined description: Create variable named undefined
flags: [noStrict]
---*/ ---*/
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////