From 09520115010779c394a9d49762c8d31da7120af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 29 Apr 2015 17:39:10 +0200 Subject: [PATCH] Fix strict mode errors in built-ins/Function Add missing "var" declarations and noStrict flags. Part of issue #35. --- test/built-ins/Function/S15.3.5_A3_T1.js | 4 ++-- test/built-ins/Function/S15.3.5_A3_T2.js | 4 ++-- test/built-ins/Function/length/S15.3.5.1_A1_T1.js | 2 +- test/built-ins/Function/length/S15.3.5.1_A1_T2.js | 2 +- test/built-ins/Function/length/S15.3.5.1_A1_T3.js | 2 +- test/built-ins/Function/length/S15.3.5.1_A2_T1.js | 2 +- test/built-ins/Function/length/S15.3.5.1_A2_T2.js | 2 +- test/built-ins/Function/length/S15.3.5.1_A2_T3.js | 2 +- test/built-ins/Function/length/S15.3.5.1_A3_T1.js | 1 + test/built-ins/Function/length/S15.3.5.1_A3_T2.js | 1 + test/built-ins/Function/length/S15.3.5.1_A3_T3.js | 1 + test/built-ins/Function/length/S15.3.5.1_A4_T1.js | 4 ++-- test/built-ins/Function/length/S15.3.5.1_A4_T2.js | 4 ++-- test/built-ins/Function/length/S15.3.5.1_A4_T3.js | 4 ++-- test/built-ins/Function/prototype/S15.3.3.1_A1.js | 1 + test/built-ins/Function/prototype/S15.3.3.1_A2.js | 2 +- test/built-ins/Function/prototype/S15.3.3.1_A3.js | 1 + test/built-ins/Function/prototype/S15.3.4_A5.js | 6 +++--- test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js | 1 + test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js | 1 + .../Function/prototype/apply/S15.3.4.3_A10.js | 1 + .../Function/prototype/apply/S15.3.4.3_A3_T10.js | 1 + .../Function/prototype/apply/S15.3.4.3_A3_T6.js | 1 + .../Function/prototype/apply/S15.3.4.3_A3_T8.js | 1 + .../Function/prototype/apply/S15.3.4.3_A5_T3.js | 1 + .../Function/prototype/apply/S15.3.4.3_A5_T4.js | 1 + .../Function/prototype/apply/S15.3.4.3_A6_T3.js | 2 +- .../Function/prototype/apply/S15.3.4.3_A7_T3.js | 6 +++--- .../Function/prototype/apply/S15.3.4.3_A7_T4.js | 6 +++--- .../Function/prototype/apply/S15.3.4.3_A7_T5.js | 2 +- .../Function/prototype/apply/S15.3.4.3_A7_T6.js | 2 +- .../Function/prototype/apply/S15.3.4.3_A7_T9.js | 2 +- .../Function/prototype/apply/S15.3.4.3_A8_T1.js | 8 ++++---- .../Function/prototype/apply/S15.3.4.3_A8_T2.js | 8 ++++---- .../Function/prototype/apply/S15.3.4.3_A8_T3.js | 8 ++++---- .../Function/prototype/apply/S15.3.4.3_A8_T4.js | 8 ++++---- .../Function/prototype/apply/S15.3.4.3_A8_T5.js | 10 +++++----- .../Function/prototype/apply/S15.3.4.3_A8_T6.js | 8 ++++---- .../built-ins/Function/prototype/bind/15.3.4.5-15-3.js | 1 + .../built-ins/Function/prototype/call/S15.3.4.4_A10.js | 1 + .../built-ins/Function/prototype/call/S15.3.4.4_A11.js | 2 +- .../Function/prototype/call/S15.3.4.4_A3_T10.js | 1 + .../Function/prototype/call/S15.3.4.4_A3_T6.js | 1 + .../Function/prototype/call/S15.3.4.4_A3_T8.js | 1 + .../Function/prototype/call/S15.3.4.4_A5_T3.js | 1 + .../Function/prototype/call/S15.3.4.4_A5_T4.js | 1 + .../Function/prototype/call/S15.3.4.4_A7_T1.js | 6 +++--- .../Function/prototype/call/S15.3.4.4_A7_T2.js | 6 +++--- .../Function/prototype/call/S15.3.4.4_A7_T3.js | 6 +++--- .../Function/prototype/call/S15.3.4.4_A7_T4.js | 6 +++--- .../Function/prototype/call/S15.3.4.4_A7_T5.js | 6 +++--- .../Function/prototype/call/S15.3.4.4_A7_T6.js | 6 +++--- .../Function/prototype/toString/S15.3.4.2_A10.js | 1 + .../Function/prototype/toString/S15.3.4.2_A8.js | 2 +- 54 files changed, 96 insertions(+), 75 deletions(-) diff --git a/test/built-ins/Function/S15.3.5_A3_T1.js b/test/built-ins/Function/S15.3.5_A3_T1.js index 33759bb062..a1aa14f966 100644 --- a/test/built-ins/Function/S15.3.5_A3_T1.js +++ b/test/built-ins/Function/S15.3.5_A3_T1.js @@ -7,8 +7,8 @@ es5id: 15.3.5_A3_T1 description: As constructor use Function("var x =1; this.y=2;return \"OK\";") ---*/ -FACTORY = Function("var x =1; this.y=2;return \"OK\";"); -obj = new FACTORY; +var FACTORY = Function("var x =1; this.y=2;return \"OK\";"); +var obj = new FACTORY; //CHECK#1 if (typeof obj !== "object") { diff --git a/test/built-ins/Function/S15.3.5_A3_T2.js b/test/built-ins/Function/S15.3.5_A3_T2.js index b3959cbc95..861e754d49 100644 --- a/test/built-ins/Function/S15.3.5_A3_T2.js +++ b/test/built-ins/Function/S15.3.5_A3_T2.js @@ -9,8 +9,8 @@ description: > this.y=arg1+arg2;return \"OK\";") ---*/ -FACTORY = new Function("arg1,arg2","var x =1; this.y=arg1+arg2;return \"OK\";"); -obj = new FACTORY("1",2); +var FACTORY = new Function("arg1,arg2","var x =1; this.y=arg1+arg2;return \"OK\";"); +var obj = new FACTORY("1",2); //CHECK#1 if (typeof obj !== "object") { diff --git a/test/built-ins/Function/length/S15.3.5.1_A1_T1.js b/test/built-ins/Function/length/S15.3.5.1_A1_T1.js index 11b34296ea..51e57b294e 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A1_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A1_T1.js @@ -10,7 +10,7 @@ description: Checking length property of Function("arg1,arg2,arg3", null) includes: [$FAIL.js] ---*/ -f = new Function("arg1,arg2,arg3", null); +var f = new Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { diff --git a/test/built-ins/Function/length/S15.3.5.1_A1_T2.js b/test/built-ins/Function/length/S15.3.5.1_A1_T2.js index 7bc6120047..b71c78bc52 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A1_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A1_T2.js @@ -12,7 +12,7 @@ description: > includes: [$FAIL.js] ---*/ -f = Function("arg1,arg2,arg3","arg4,arg5", null); +var f = Function("arg1,arg2,arg3","arg4,arg5", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { diff --git a/test/built-ins/Function/length/S15.3.5.1_A1_T3.js b/test/built-ins/Function/length/S15.3.5.1_A1_T3.js index 28f0c45471..78d576ec87 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A1_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A1_T3.js @@ -12,7 +12,7 @@ description: > includes: [$FAIL.js] ---*/ -f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); +var f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { diff --git a/test/built-ins/Function/length/S15.3.5.1_A2_T1.js b/test/built-ins/Function/length/S15.3.5.1_A2_T1.js index 0a4b99e1c7..9151065b89 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A2_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A2_T1.js @@ -10,7 +10,7 @@ description: > includes: [$FAIL.js] ---*/ -f = new Function("arg1,arg2,arg3", null); +var f = new Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { diff --git a/test/built-ins/Function/length/S15.3.5.1_A2_T2.js b/test/built-ins/Function/length/S15.3.5.1_A2_T2.js index 4fdb0c08e6..77335fb25f 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A2_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A2_T2.js @@ -10,7 +10,7 @@ description: > includes: [$FAIL.js] ---*/ -f = Function("arg1,arg2,arg3","arg4,arg5", null); +var f = Function("arg1,arg2,arg3","arg4,arg5", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { diff --git a/test/built-ins/Function/length/S15.3.5.1_A2_T3.js b/test/built-ins/Function/length/S15.3.5.1_A2_T3.js index 7bbea1d78f..553fd94065 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A2_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A2_T3.js @@ -10,7 +10,7 @@ description: > includes: [$FAIL.js] ---*/ -f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); +var f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T1.js b/test/built-ins/Function/length/S15.3.5.1_A3_T1.js index acc5228121..78f134f73e 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T1.js @@ -7,6 +7,7 @@ es5id: 15.3.5.1_A3_T1 description: > Checking if varying the length property of Function("arg1,arg2,arg3","arg4,arg5", null) fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T2.js b/test/built-ins/Function/length/S15.3.5.1_A3_T2.js index 826e3af6a6..d7993cb30c 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T2.js @@ -7,6 +7,7 @@ es5id: 15.3.5.1_A3_T2 description: > Checking if varying the length property of Function("arg1,arg2,arg3", null) fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T3.js b/test/built-ins/Function/length/S15.3.5.1_A3_T3.js index dc4f6c3b3e..1156a5a9dc 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T3.js @@ -7,6 +7,7 @@ es5id: 15.3.5.1_A3_T3 description: > Checking if varying the length property of Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/length/S15.3.5.1_A4_T1.js b/test/built-ins/Function/length/S15.3.5.1_A4_T1.js index aa8cc67a42..f347f4b35a 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A4_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A4_T1.js @@ -10,14 +10,14 @@ description: > includes: [$FAIL.js] ---*/ -f = new Function("arg1,arg2,arg3", null); +var f = new Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { $FAIL('#1: the function has length property.'); } -for(key in f) +for(var key in f) if(key=="length") var lengthenumed=true; diff --git a/test/built-ins/Function/length/S15.3.5.1_A4_T2.js b/test/built-ins/Function/length/S15.3.5.1_A4_T2.js index 457a3e08b6..62a663df87 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A4_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A4_T2.js @@ -10,14 +10,14 @@ description: > includes: [$FAIL.js] ---*/ -f = Function("arg1,arg2,arg3","arg5,arg4", null); +var f = Function("arg1,arg2,arg3","arg5,arg4", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { $FAIL('#1: the function has length property.'); } -for(key in f) +for(var key in f) if(key=="length") var lengthenumed=true; diff --git a/test/built-ins/Function/length/S15.3.5.1_A4_T3.js b/test/built-ins/Function/length/S15.3.5.1_A4_T3.js index 366190ab5c..49b3303026 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A4_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A4_T3.js @@ -10,14 +10,14 @@ description: > includes: [$FAIL.js] ---*/ -f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); +var f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { $FAIL('#1: the function has length property.'); } -for(key in f) +for(var key in f) if(key=="length") var lengthenumed=true; diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A1.js b/test/built-ins/Function/prototype/S15.3.3.1_A1.js index 63c29cc5c8..6b7df68ea7 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A1.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A1.js @@ -5,6 +5,7 @@ info: The Function.prototype property has the attribute ReadOnly es5id: 15.3.3.1_A1 description: Checking if varying the Function.prototype property fails +flags: [noStrict] ---*/ var obj = Function.prototype; diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A2.js b/test/built-ins/Function/prototype/S15.3.3.1_A2.js index a5cca523cc..280e6d3a53 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A2.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A2.js @@ -15,7 +15,7 @@ if (Function.propertyIsEnumerable('prototype')) { // CHECK#2 var count=0; -for (p in Function){ +for (var p in Function){ if (p==="prototype") count++; } diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A3.js b/test/built-ins/Function/prototype/S15.3.3.1_A3.js index c33d356882..c5f7955320 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A3.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A3.js @@ -5,6 +5,7 @@ info: The Function.prototype property has the attribute DontDelete es5id: 15.3.3.1_A3 description: Checking if deleting the Function.prototype property fails +flags: [noStrict] ---*/ delete Function.prototype; diff --git a/test/built-ins/Function/prototype/S15.3.4_A5.js b/test/built-ins/Function/prototype/S15.3.4_A5.js index fd0a6d3491..664d35a967 100644 --- a/test/built-ins/Function/prototype/S15.3.4_A5.js +++ b/test/built-ins/Function/prototype/S15.3.4_A5.js @@ -4,7 +4,7 @@ /*--- info: > The Function prototype object is itself a Function object without - [[create]] property + [[Construct]] property es5id: 15.3.4_A5 description: Checking if creating "new Function.prototype object" fails includes: @@ -15,8 +15,8 @@ includes: //CHECK# try { var obj = new Function.prototype; - $FAIL('#1: The Function prototype object is itself a Function object without [[create]] property: '+e); + $FAIL('#1: The Function prototype object is itself a Function object without [[Construct]] property: '+e); } catch (e) { - $PRINT("#1.1: The Function prototype object is itself a Function object without [[create]] property "+e); + $PRINT("#1.1: The Function prototype object is itself a Function object without [[Construct]] property "+e); } diff --git a/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js b/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js index a1dfb9bac1..2844023b4b 100644 --- a/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js +++ b/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js @@ -7,6 +7,7 @@ es5id: 15.3.5.2_A1_T1 description: > Checking if deleting the prototype property of Function("", null) fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js b/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js index fe63c883ef..3ac833ed1c 100644 --- a/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js +++ b/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js @@ -7,6 +7,7 @@ es5id: 15.3.5.2_A1_T2 description: > Checking if deleting the prototype property of Function(void 0, "") fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js index 8e85216f0c..8219a5e8a6 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js @@ -7,6 +7,7 @@ es5id: 15.3.4.3_A10 description: > Checking if varying the Function.prototype.apply.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js index 04aec4e16c..d5d624531b 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T10.js @@ -7,6 +7,7 @@ info: > object as the this value es5id: 15.3.4.3_A3_T10 description: Checking by using eval, no any arguments at apply function +flags: [noStrict] ---*/ eval(" (function(){this.feat=1}).apply()"); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js index 018e2d3b25..962c63e3cf 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js @@ -9,6 +9,7 @@ es5id: 15.3.4.3_A3_T6 description: > Argument at apply function is null and it called inside function declaration +flags: [noStrict] ---*/ function FACTORY(){ diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js index 3da82a0b91..78e52dc063 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js @@ -9,6 +9,7 @@ es5id: 15.3.4.3_A3_T8 description: > Argument at apply function is undefined and it called inside function declaration +flags: [noStrict] ---*/ (function FACTORY(){ diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js index 5273af8562..66bbc21a0b 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js @@ -7,6 +7,7 @@ info: > ToObject(thisArg) as the this value es5id: 15.3.4.3_A5_T3 description: thisArg is string +flags: [noStrict] ---*/ var obj="soap"; diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js index 8e53383fe5..4dc1654ec2 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js @@ -7,6 +7,7 @@ info: > ToObject(thisArg) as the this value es5id: 15.3.4.3_A5_T4 description: thisArg is function variable that return this +flags: [noStrict] ---*/ f = function(){this.touched= true; return this;}; diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js index 2b848bf92a..55d32577b0 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js @@ -10,7 +10,7 @@ description: argArray is (object,"1,3,4") includes: [$FAIL.js] ---*/ -obj={}; +var obj={}; //CHECK#1 try { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js index b7cf12465a..9a6ba16bfb 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js @@ -9,11 +9,11 @@ es5id: 15.3.4.3_A7_T3 description: argArray is (empty object, new Array("nine","inch","nails")) ---*/ -i=0; +var i=0; -p={toString:function(){return "a"+(++i);}}; +var p={toString:function(){return "a"+(++i);}}; -obj={}; +var obj={}; Function(p,"a2,a3","this.shifted=a1;").apply(obj, new Array("nine","inch","nails")); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js index 92a60ce1ba..860a9a7d4e 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js @@ -11,11 +11,11 @@ description: > ("a","b","c")) ---*/ -i=0; +var i=0; -p={toString:function(){return "a"+(++i);}}; +var p={toString:function(){return "a"+(++i);}}; -obj={}; +var obj={}; new Function(p,p,p, "this.shifted=a3;").apply( obj,( function(){return arguments;}) ("a","b","c") ); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js index 960d5677ba..8c02f92a27 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js @@ -13,7 +13,7 @@ function FACTORY(){ Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(null,arguments); } -obj=new FACTORY("",1,2); +var obj=new FACTORY("",1,2); //CHECK#1 if (this["shifted"] !== "12") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js index 2ba276d6cb..420c49d143 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js @@ -13,7 +13,7 @@ function FACTORY(){ Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(this,arguments); } -obj=new FACTORY("",4,2); +var obj=new FACTORY("",4,2); //CHECK#1 if (obj["shifted"] !== "42") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js index ff2090d75f..3e7105b65d 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js @@ -17,7 +17,7 @@ function FACTORY(){ return obj; } -obj=new FACTORY("",1,2); +var obj=new FACTORY("",1,2); //CHECK#1 if (typeof this["shifted"] !== "undefined") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js index 90b56a4e0f..d0e3eb7d02 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T1.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.apply can`t be used as [[create]] caller +info: Function.prototype.apply can`t be used as [[Construct]] caller es5id: 15.3.4.3_A8_T1 description: Checking if creating "new Function.prototype.apply" fails ---*/ try { - obj = new Function.prototype.apply; - $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller'); + var obj = new Function.prototype.apply; + $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js index 120bf37b3f..a052dca72e 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T2.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.apply can`t be used as [[create]] caller +info: Function.prototype.apply can`t be used as [[Construct]] caller es5id: 15.3.4.3_A8_T2 description: Checking if creating "new Function.prototype.apply()" fails ---*/ try { - obj = new Function.prototype.apply(); - $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller'); + var obj = new Function.prototype.apply(); + $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js index b96c91f568..07639d449a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T3.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.apply can`t be used as [[create]] caller +info: Function.prototype.apply can`t be used as [[Construct]] caller es5id: 15.3.4.3_A8_T3 description: Checking if creating "new Function.apply" fails ---*/ try { - obj = new Function.apply; - $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller'); + var obj = new Function.apply; + $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js index 329ca1bb07..0279d3e1e4 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.apply can`t be used as [[create]] caller +info: Function.prototype.apply can`t be used as [[Construct]] caller es5id: 15.3.4.3_A8_T4 description: Checking if creating "new (Function("this.p1=1").apply)" fails ---*/ try { - obj = new (Function("this.p1=1").apply); - $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller'); + var obj = new (Function("this.p1=1").apply); + $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js index b212190e4a..c5a61d79bf 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T5.js @@ -2,17 +2,17 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.apply can`t be used as [[create]] caller +info: Function.prototype.apply can`t be used as [[Construct]] caller es5id: 15.3.4.3_A8_T5 description: Checking if creating "new Function("this.p1=1").apply" fails ---*/ try { - FACTORY = Function("this.p1=1").apply; - obj = new FACTORY(); - $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller'); + var FACTORY = Function("this.p1=1").apply; + var obj = new FACTORY(); + $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js index 3768247e5e..ea44af1c2e 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.apply can`t be used as [[create]] caller +info: Function.prototype.apply can`t be used as [[Construct]] caller es5id: 15.3.4.3_A8_T6 description: > Checking if creating "new (Function("function @@ -11,12 +11,12 @@ description: > //CHECK#1 try { - obj = new (Function("function f(){this.p1=1;};return f").apply()); + var obj = new (Function("function f(){this.p1=1;};return f").apply()); } catch (e) { - $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } //CHECK#2 if (obj.p1!== 1) { - $ERROR('#2: Function.prototype.apply can\'t be used as [[create]] caller'); + $ERROR('#2: Function.prototype.apply can\'t be used as [[Construct]] caller'); } diff --git a/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js b/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js index 9dcc35ed8b..a11fb1344e 100644 --- a/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js +++ b/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js @@ -9,6 +9,7 @@ es5id: 15.3.4.5-15-3 description: > Function.prototype.bind - The [[Writable]] attribute of length property in F set as false +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js index d539d906db..f9eae7d6da 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js @@ -7,6 +7,7 @@ es5id: 15.3.4.4_A10 description: > Checking if varying the Function.prototype.call.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js index 26183e0086..ab7f680ef5 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A11.js @@ -22,7 +22,7 @@ if (Function.prototype.call.propertyIsEnumerable('length')) { } // CHECK#2 -for (p in Function.prototype.call){ +for (var p in Function.prototype.call){ if (p==="length") $ERROR('#2: the Function.prototype.call.length property has the attributes DontEnum'); } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js index 425eff43e9..21b3e497f8 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T10.js @@ -7,6 +7,7 @@ info: > object as the this value es5id: 15.3.4.4_A3_T10 description: Checking by using eval, no any arguments at call function +flags: [noStrict] ---*/ eval(" (function(){this.feat=1}).call()"); diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js index 66284e8428..36daa65828 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T6.js @@ -9,6 +9,7 @@ es5id: 15.3.4.4_A3_T6 description: > Argument at call function is null and it called inside function declaration +flags: [noStrict] ---*/ function FACTORY(){ diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js index 92016f1be2..c72f28855f 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A3_T8.js @@ -9,6 +9,7 @@ es5id: 15.3.4.4_A3_T8 description: > Argument at call function is undefined and it called inside function declaration +flags: [noStrict] ---*/ (function FACTORY(){ diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js index 05cbffe39d..f2a3fe6d28 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js @@ -7,6 +7,7 @@ info: > ToObject(thisArg) as the this value es5id: 15.3.4.4_A5_T3 description: thisArg is string +flags: [noStrict] ---*/ var obj="soap"; diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js index 47c2a75dd4..a02e92bdb2 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A5_T4.js @@ -7,6 +7,7 @@ info: > ToObject(thisArg) as the this value es5id: 15.3.4.4_A5_T4 description: thisArg is function variable that return this +flags: [noStrict] ---*/ var f = function(){this.touched= true; return this;}; diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js index 6b0987bc35..92a7409b2c 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T1.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.call can't be used as [[create]] caller +info: Function.prototype.call can't be used as [[Construct]] caller es5id: 15.3.4.4_A7_T1 description: Checking if creating "new Function.prototype.call" fails ---*/ try { var obj = new Function.prototype.call; - $ERROR('#1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js index bda73bde2e..941974210f 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T2.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.call can't be used as [[create]] caller +info: Function.prototype.call can't be used as [[Construct]] caller es5id: 15.3.4.4_A7_T2 description: Checking if creating "new Function.prototype.call()" fails ---*/ @@ -10,9 +10,9 @@ description: Checking if creating "new Function.prototype.call()" fails try { var FACTORY = Function.prototype.call; var obj = new FACTORY(); - $ERROR('#1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js index dc9261f278..b2b2231007 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T3.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.call can't be used as [[create]] caller +info: Function.prototype.call can't be used as [[Construct]] caller es5id: 15.3.4.4_A7_T3 description: Checking if creating "new Function.call" fails ---*/ try { var obj = new Function.call; - $ERROR('#1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js index 9ba7a315ed..f3dee96035 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js @@ -2,16 +2,16 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.call can't be used as [[create]] caller +info: Function.prototype.call can't be used as [[Construct]] caller es5id: 15.3.4.4_A7_T4 description: Checking if creating "new (Function("this.p1=1").call)" fails ---*/ try { var obj = new (Function("this.p1=1").call); - $ERROR('#1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js index 8242b79541..1482c55c3e 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T5.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.call can't be used as [[create]] caller +info: Function.prototype.call can't be used as [[Construct]] caller es5id: 15.3.4.4_A7_T5 description: Checking if creating "new Function("this.p1=1").call" fails ---*/ @@ -10,9 +10,9 @@ description: Checking if creating "new Function("this.p1=1").call" fails try { var FACTORY = Function("this.p1=1").call; var obj = new FACTORY(); - $ERROR('#1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1.1: Function.prototype.call can\'t be used as [[Construct]] caller'); } } diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js index 451f257c95..d88e10c020 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Function.prototype.call can't be used as [[create]] caller +info: Function.prototype.call can't be used as [[Construct]] caller es5id: 15.3.4.4_A7_T6 description: > Checking if creating "new (Function("function @@ -13,10 +13,10 @@ description: > try { var obj = new (Function("function f(){this.p1=1;};return f").call()); } catch (e) { - $ERROR('#1: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#1: Function.prototype.call can\'t be used as [[Construct]] caller'); } //CHECK#2 if (obj.p1!== 1) { - $ERROR('#2: Function.prototype.call can\'t be used as [[create]] caller'); + $ERROR('#2: Function.prototype.call can\'t be used as [[Construct]] caller'); } diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js index f9fdde310f..511765b6f5 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js @@ -7,6 +7,7 @@ es5id: 15.3.4.2_A10 description: > Checking if varying the Function.prototype.toString.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js index 7134f47087..47cd4efcc3 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A8.js @@ -22,7 +22,7 @@ if (Function.prototype.toString.propertyIsEnumerable('length')) { } // CHECK#2 -for (p in Function.prototype.toString){ +for (var p in Function.prototype.toString){ if (p==="length") $ERROR('#2: the Function.prototype.toString.length property has the attributes DontEnum'); }