From 97bebe1c8b66a3daa824199480cc29ba4fdb05a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 29 Apr 2015 17:43:26 +0200 Subject: [PATCH] Fix strict mode errors in built-ins/String - Add missing "var" declarations and noStrict flags - Remove with-statements (minor change in behaviour - primitive vs wrapper lookup, but does not seem too important for these tests) Part of issue #35. --- test/built-ins/String/S15.5.1.1_A1_T18.js | 2 +- test/built-ins/String/S15.5.2.1_A1_T16.js | 2 +- test/built-ins/String/S15.5.5.1_A2.js | 2 +- test/built-ins/String/S15.5.5.1_A3.js | 7 ++++--- test/built-ins/String/S15.5.5.1_A4.js | 1 + test/built-ins/String/prototype/S15.5.3.1_A2.js | 2 +- test/built-ins/String/prototype/S15.5.3.1_A3.js | 1 + test/built-ins/String/prototype/S15.5.3.1_A4.js | 1 + .../String/prototype/charAt/S15.5.4.4_A1.1.js | 4 +--- .../String/prototype/charAt/S15.5.4.4_A10.js | 1 + .../String/prototype/charAt/S15.5.4.4_A1_T10.js | 6 ++---- .../String/prototype/charAt/S15.5.4.4_A8.js | 2 +- .../String/prototype/charCodeAt/S15.5.4.5_A1.1.js | 3 --- .../String/prototype/charCodeAt/S15.5.4.5_A10.js | 1 + .../String/prototype/charCodeAt/S15.5.4.5_A1_T10.js | 6 ++---- .../String/prototype/charCodeAt/S15.5.4.5_A8.js | 2 +- .../String/prototype/concat/S15.5.4.6_A10.js | 1 + .../String/prototype/concat/S15.5.4.6_A1_T10.js | 10 ++++------ .../String/prototype/concat/S15.5.4.6_A8.js | 4 ++-- .../String/prototype/indexOf/S15.5.4.7_A10.js | 1 + .../String/prototype/indexOf/S15.5.4.7_A1_T10.js | 6 ++---- .../String/prototype/indexOf/S15.5.4.7_A4_T1.js | 10 +++------- .../String/prototype/indexOf/S15.5.4.7_A4_T2.js | 6 ++---- .../String/prototype/indexOf/S15.5.4.7_A4_T4.js | 6 ++---- .../String/prototype/indexOf/S15.5.4.7_A8.js | 2 +- .../String/prototype/lastIndexOf/S15.5.4.8_A10.js | 1 + .../String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js | 6 ++---- .../String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js | 10 +++------- .../String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js | 6 ++---- .../String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js | 6 ++---- .../String/prototype/lastIndexOf/S15.5.4.8_A8.js | 4 ++-- .../String/prototype/localeCompare/S15.5.4.9_A10.js | 1 + .../String/prototype/localeCompare/S15.5.4.9_A8.js | 2 +- .../String/prototype/match/S15.5.4.10_A10.js | 1 + .../String/prototype/match/S15.5.4.10_A1_T10.js | 6 ++---- .../String/prototype/match/S15.5.4.10_A1_T11.js | 10 +++------- .../String/prototype/match/S15.5.4.10_A1_T12.js | 6 ++---- .../String/prototype/match/S15.5.4.10_A8.js | 2 +- .../String/prototype/replace/15.5.4.11-1.js | 1 + .../String/prototype/replace/S15.5.4.11_A10.js | 1 + .../String/prototype/replace/S15.5.4.11_A1_T10.js | 6 ++---- .../String/prototype/replace/S15.5.4.11_A1_T11.js | 10 +++------- .../String/prototype/replace/S15.5.4.11_A1_T12.js | 6 ++---- .../String/prototype/replace/S15.5.4.11_A8.js | 4 ++-- .../String/prototype/search/S15.5.4.12_A10.js | 1 + .../String/prototype/search/S15.5.4.12_A1_T10.js | 6 ++---- .../String/prototype/search/S15.5.4.12_A1_T11.js | 10 +++------- .../String/prototype/search/S15.5.4.12_A1_T12.js | 6 ++---- .../String/prototype/search/S15.5.4.12_A8.js | 2 +- .../String/prototype/slice/S15.5.4.13_A10.js | 1 + .../String/prototype/slice/S15.5.4.13_A1_T10.js | 6 ++---- .../String/prototype/slice/S15.5.4.13_A1_T11.js | 10 +++------- .../String/prototype/slice/S15.5.4.13_A1_T12.js | 6 ++---- .../String/prototype/slice/S15.5.4.13_A1_T8.js | 2 +- .../String/prototype/slice/S15.5.4.13_A8.js | 2 +- .../String/prototype/split/S15.5.4.14_A10.js | 1 + .../String/prototype/split/S15.5.4.14_A1_T10.js | 12 +++++------- .../String/prototype/split/S15.5.4.14_A1_T11.js | 10 +++------- .../String/prototype/split/S15.5.4.14_A1_T12.js | 6 ++---- .../String/prototype/split/S15.5.4.14_A1_T14.js | 6 ++---- .../String/prototype/split/S15.5.4.14_A1_T17.js | 2 +- .../String/prototype/split/S15.5.4.14_A8.js | 2 +- .../String/prototype/substring/S15.5.4.15_A10.js | 1 + .../String/prototype/substring/S15.5.4.15_A1_T10.js | 6 ++---- .../String/prototype/substring/S15.5.4.15_A1_T11.js | 10 +++------- .../String/prototype/substring/S15.5.4.15_A1_T12.js | 6 ++---- .../prototype/toLocaleLowerCase/S15.5.4.17_A10.js | 1 + .../prototype/toLocaleUpperCase/S15.5.4.19_A10.js | 1 + .../String/prototype/toLowerCase/S15.5.4.16_A10.js | 1 + .../String/prototype/toLowerCase/S15.5.4.16_A1_T2.js | 2 +- .../String/prototype/toLowerCase/S15.5.4.16_A8.js | 2 +- .../String/prototype/toUpperCase/S15.5.4.18_A10.js | 1 + .../String/prototype/toUpperCase/S15.5.4.18_A8.js | 2 +- 73 files changed, 121 insertions(+), 181 deletions(-) diff --git a/test/built-ins/String/S15.5.1.1_A1_T18.js b/test/built-ins/String/S15.5.1.1_A1_T18.js index e67ff4e04d..217f18f55c 100644 --- a/test/built-ins/String/S15.5.1.1_A1_T18.js +++ b/test/built-ins/String/S15.5.1.1_A1_T18.js @@ -9,7 +9,7 @@ es5id: 15.5.1.1_A1_T18 description: Call String() with numbers that have more than 1 significant digit ---*/ -__str = String(1000000000000000000000); +var __str = String(1000000000000000000000); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 diff --git a/test/built-ins/String/S15.5.2.1_A1_T16.js b/test/built-ins/String/S15.5.2.1_A1_T16.js index 8f424357c2..b15e8f6368 100644 --- a/test/built-ins/String/S15.5.2.1_A1_T16.js +++ b/test/built-ins/String/S15.5.2.1_A1_T16.js @@ -11,7 +11,7 @@ description: > and other numbers ---*/ -__str =new String(.12345); +var __str =new String(.12345); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (typeof __str !== "object") { diff --git a/test/built-ins/String/S15.5.5.1_A2.js b/test/built-ins/String/S15.5.5.1_A2.js index 72dc86539c..764e7bd018 100644 --- a/test/built-ins/String/S15.5.5.1_A2.js +++ b/test/built-ins/String/S15.5.5.1_A2.js @@ -19,7 +19,7 @@ if (!(__str__instance.hasOwnProperty("length"))) { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 -for(prop in __str__instance){ +for(var prop in __str__instance){ if (prop === "length") { $ERROR('#2: length property has the attributes {DontEnum}'); } diff --git a/test/built-ins/String/S15.5.5.1_A3.js b/test/built-ins/String/S15.5.5.1_A3.js index afea026525..5d550b7d42 100644 --- a/test/built-ins/String/S15.5.5.1_A3.js +++ b/test/built-ins/String/S15.5.5.1_A3.js @@ -5,6 +5,7 @@ info: length property has the attributes {DontDelete} es5id: 15.5.5.1_A3 description: Checking if deleting the length property of String fails +flags: [noStrict] ---*/ var __str__instance = new String("globglob"); @@ -19,8 +20,8 @@ if (!(__str__instance.hasOwnProperty("length"))) { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 -if (delete __str__instance === true) { - $ERROR('#2: var __str__instance = new String("globglob"); delete __str__instance !== true'); +if (delete __str__instance.length === true) { + $ERROR('#2: var __str__instance = new String("globglob"); delete __str__instance.length !== true'); } // ////////////////////////////////////////////////////////////////////////////// @@ -28,7 +29,7 @@ if (delete __str__instance === true) { ////////////////////////////////////////////////////////////////////////////// //CHECK#3 if (!(__str__instance.hasOwnProperty("length"))) { - $ERROR('#3: var __str__instance = new String("globglob"); delete __str__instance; __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); + $ERROR('#3: var __str__instance = new String("globglob"); delete __str__instance.length; __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/S15.5.5.1_A4.js b/test/built-ins/String/S15.5.5.1_A4.js index 38ef7ad607..8c17dee481 100644 --- a/test/built-ins/String/S15.5.5.1_A4.js +++ b/test/built-ins/String/S15.5.5.1_A4.js @@ -5,6 +5,7 @@ info: length property has the attributes {ReadOnly} es5id: 15.5.5.1_A4 description: Checking if varying the length property of String fails +flags: [noStrict] ---*/ var __str__instance = new String("globglob"); diff --git a/test/built-ins/String/prototype/S15.5.3.1_A2.js b/test/built-ins/String/prototype/S15.5.3.1_A2.js index acb282a998..7d54a617a0 100644 --- a/test/built-ins/String/prototype/S15.5.3.1_A2.js +++ b/test/built-ins/String/prototype/S15.5.3.1_A2.js @@ -30,7 +30,7 @@ if (String.propertyIsEnumerable('prototype')) { // CHECK#2 var count=0; -for (p in String){ +for (var p in String){ if (p==="prototype") count++; } diff --git a/test/built-ins/String/prototype/S15.5.3.1_A3.js b/test/built-ins/String/prototype/S15.5.3.1_A3.js index df2cfcffad..8ee49875f8 100644 --- a/test/built-ins/String/prototype/S15.5.3.1_A3.js +++ b/test/built-ins/String/prototype/S15.5.3.1_A3.js @@ -5,6 +5,7 @@ info: The String.prototype property has the attribute DontDelete es5id: 15.5.3.1_A3 description: Checking if deleting the String.prototype property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/S15.5.3.1_A4.js b/test/built-ins/String/prototype/S15.5.3.1_A4.js index 0b7b94f267..71eb71d235 100644 --- a/test/built-ins/String/prototype/S15.5.3.1_A4.js +++ b/test/built-ins/String/prototype/S15.5.3.1_A4.js @@ -5,6 +5,7 @@ info: The String.prototype property has the attribute ReadOnly es5id: 15.5.3.1_A4 description: Checking if varying the String.prototype property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1.1.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1.1.js index 09a054f675..a89daec9b7 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1.1.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1.1.js @@ -11,14 +11,12 @@ function __FACTORY(){this.toString = function(){ return "wizard";};}; __FACTORY.prototype.charAt = String.prototype.charAt; -__instance = new __FACTORY; +var __instance = new __FACTORY; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__instance){ if (__instance.charAt(eval("1"),true,null,{})!== "i") { $ERROR('#1: __instance.charAt(eval("1"),true,null,{})=== "i". Actual: '+__instance.charAt(eval("1"),true,null,{})); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js index 07076ac751..c07d01b269 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.4_A10 description: > Checking if varying the String.prototype.charAt.length property fails +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T10.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T10.js index 271c22c069..b92349adcd 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T10.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T10.js @@ -12,10 +12,8 @@ var __str = "lego"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (charAt(__obj) !== "e") { - $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; charAt(__obj) === "e". Actual: charAt(__obj) ==='+charAt(__obj) ); + if (__str.charAt(__obj) !== "e") { + $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charAt(__obj) === "e". Actual: '+__str.charAt(__obj) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A8.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A8.js index 1b2b5e72b9..51dc2ca116 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A8.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A8.js @@ -30,7 +30,7 @@ if (String.prototype.charAt.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.charAt){ +for (var p in String.prototype.charAt){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js index df073dc699..24ac132749 100644 --- a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js +++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js @@ -15,11 +15,8 @@ var __instance = new __FACTORY; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__instance){ - if (__instance.charCodeAt(eval("1"),true,null,{})!== 0x69) { $ERROR('#1: __instance.charCodeAt(eval("1"),true,null,{})=== 0x69. Actual: __instance.charCodeAt(eval("1"),true,null,{})==='+__instance.charCodeAt(eval("1"),true,null,{})); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js index 81dbbc563c..5f4e556f68 100644 --- a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js +++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.5_A10 description: > Checking if varying the String.prototype.charCodeAt.length property fails +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js index 9c2164628e..74b3895c59 100644 --- a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js +++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js @@ -12,10 +12,8 @@ var __str = "lego"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (charCodeAt(__obj) !== 0x65) { - $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; charCodeAt(__obj) === 0x65. Actual: charCodeAt(__obj) ==='+charCodeAt(__obj) ); + if (__str.charCodeAt(__obj) !== 0x65) { + $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charCodeAt(__obj) === 0x65. Actual: '+__str.charCodeAt(__obj) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js index bfc9dcf4d0..7aa9fa502e 100644 --- a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js +++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js @@ -31,7 +31,7 @@ if (String.prototype.charCodeAt.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.charCodeAt){ +for (var p in String.prototype.charCodeAt){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js index 7aac0eb1c0..1a4e14cc56 100644 --- a/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js +++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.6_A10 description: > Checking if varying the String.prototype.concat.length property fails +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js index 66d9f49789..006d0b65d0 100644 --- a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js +++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js @@ -14,14 +14,12 @@ var __str = "lego"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (concat(__obj) !== "legoA") { - $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041";}, valueOf:function(){return "_\u0041_";}}; var __str = "lego"; concat(__obj) === "legoA". Actual: '+concat(__obj) ); + if (__str.concat(__obj) !== "legoA") { + $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041";}, valueOf:function(){return "_\u0041_";}}; var __str = "lego"; __str.concat(__obj) === "legoA". Actual: '+__str.concat(__obj) ); } - if (concat(__obj, __obj2, __obj3, x) !== "legoAtrue42undefined") { - $ERROR('#2: var x; var __obj = {toString:function(){return "\u0041";}, valueOf:function(){return "_\u0041_";}}; var __obj2 = {toString:function(){return true;}}; var __obj3 = {toString:function(){return 42;}}; var __str = "lego"; concat(__obj, __obj2, __obj3, x) === "legoAtrue42undefined". Actual: '+concat(__obj, __obj2, __obj3, x) ); + if (__str.concat(__obj, __obj2, __obj3, x) !== "legoAtrue42undefined") { + $ERROR('#2: var x; var __obj = {toString:function(){return "\u0041";}, valueOf:function(){return "_\u0041_";}}; var __obj2 = {toString:function(){return true;}}; var __obj3 = {toString:function(){return 42;}}; var __str = "lego"; __str.concat(__obj, __obj2, __obj3, x) === "legoAtrue42undefined". Actual: '+__str.concat(__obj, __obj2, __obj3, x) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js index 045567dc57..ed2660172f 100644 --- a/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js +++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js @@ -29,9 +29,9 @@ if (String.prototype.concat.propertyIsEnumerable('length')) { ////////////////////////////////////////////////////////////////////////////// // CHECK#2 -count = 0; +var count = 0; -for (p in String.prototype.concat){ +for (var p in String.prototype.concat){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js index 8a61137175..51faa063c5 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.7_A10 description: > Checking if varying the String.prototype.indexOf.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js index 1b102a0293..16c1d275b4 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js @@ -13,11 +13,9 @@ var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (indexOf(__obj, __obj2) !== 3) { - $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABB\u0041BABAB"; indexOf(__obj, __obj2) === 3. Actual: '+indexOf(__obj, __obj2) ); + if (__str.indexOf(__obj, __obj2) !== 3) { + $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABB\u0041BABAB"; __str.indexOf(__obj, __obj2) === 3. Actual: '+__str.indexOf(__obj, __obj2) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js index 8fba0cfc2f..5ab8f6bccb 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js @@ -12,21 +12,17 @@ includes: [$FAIL.js] var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){throw "intointeger";}} -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = indexOf(__obj, __obj2); - $FAIL('#1: "var x = indexOf(__obj, __obj2)" lead to throwing exception'); + var x = __str.indexOf(__obj, __obj2); + $FAIL('#1: "var x = __str.indexOf(__obj, __obj2)" lead to throwing exception'); } catch (e) { if (e!=="intointeger") { $ERROR('#1.1: Exception === "intointeger". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js index da8975af20..18ef5214b5 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js @@ -18,15 +18,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = indexOf(__obj, __obj2); - $FAIL('#1: "var x = indexOf(__obj, __obj2)" lead to throwing exception'); + var x = __str.indexOf(__obj, __obj2); + $FAIL('#1: "var x = __str.indexOf(__obj, __obj2)" lead to throwing exception'); } catch (e) { if (e!=="intointeger") { $ERROR('#1.1: Exception === "intointeger". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js index d6815ff164..5ef364a5df 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js @@ -17,15 +17,13 @@ Number.prototype.indexOf=String.prototype.indexOf; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__instance){ try { - var x = indexOf(__obj, __obj2); - $FAIL('#1: "var x = indexOf(__obj, __obj2)" lead to throwing exception'); + var x = __instance.indexOf(__obj, __obj2); + $FAIL('#1: "var x = __instance.indexOf(__obj, __obj2)" lead to throwing exception'); } catch (e) { if (e!=="intostr") { $ERROR('#1.1: Exception === "intostr". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js index 22e3a52c8a..4c5256a816 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js @@ -30,7 +30,7 @@ if (String.prototype.indexOf.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.indexOf){ +for (var p in String.prototype.indexOf){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js index a51d889b5b..538f8f6b67 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js @@ -9,6 +9,7 @@ es5id: 15.5.4.8_A10 description: > Checking if varying the String.prototype.lastIndexOf.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js index 4bfefb8de6..afc3bc4b8e 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js @@ -15,11 +15,9 @@ var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (lastIndexOf(__obj, __obj2) !== 7) { - $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return NaN;}}; var __str = "ABB\u0041BABAB";lastIndexOf(__obj, __obj2) === 7. Actual: '+lastIndexOf(__obj, __obj2) ); + if (__str.lastIndexOf(__obj, __obj2) !== 7) { + $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return NaN;}}; var __str = "ABB\u0041BABAB";lastIndexOf(__obj, __obj2) === 7. Actual: '+__str.lastIndexOf(__obj, __obj2) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js index 2e74ff267f..eb5962a9de 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js @@ -12,21 +12,17 @@ includes: [$FAIL.js] var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){throw "intointeger";}} -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = lastIndexOf(__obj, __obj2); - $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception'); + var x = __str.lastIndexOf(__obj, __obj2); + $FAIL('#1: var x = __str.lastIndexOf(__obj, __obj2) lead to throwing exception'); } catch (e) { if (e!=="intointeger") { $ERROR('#1.1: Exception === "intointeger". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js index 1666c8d4ea..9e4a33ccb7 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js @@ -18,15 +18,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = lastIndexOf(__obj, __obj2); - $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception'); + var x = __str.lastIndexOf(__obj, __obj2); + $FAIL('#1: var x = __str.lastIndexOf(__obj, __obj2) lead to throwing exception'); } catch (e) { if (e!=="intointeger") { $ERROR('#1.1: Exception === "intointeger". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js index 732a46ec5c..23230be51b 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js @@ -17,15 +17,13 @@ Number.prototype.lastIndexOf=String.prototype.lastIndexOf; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__instance){ try { - var x = lastIndexOf(__obj, __obj2); - $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception'); + var x = __instance.lastIndexOf(__obj, __obj2); + $FAIL('#1: var x = __instance.lastIndexOf(__obj, __obj2) lead to throwing exception'); } catch (e) { if (e!=="intostr") { $ERROR('#1.1: Exception === "intostr". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js index 5aadb31e56..f0a253ae5a 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js @@ -31,9 +31,9 @@ if (String.prototype.lastIndexOf.propertyIsEnumerable('length')) { ////////////////////////////////////////////////////////////////////////////// // CHECK#2 -count=0; +var count=0; -for (p in String.prototype.lastIndexOf){ +for (var p in String.prototype.lastIndexOf){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js index d6f4dbd2e0..754377c99c 100644 --- a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js +++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js @@ -9,6 +9,7 @@ es5id: 15.5.4.9_A10 description: > Checking if varying the String.prototype.localeCompare.length property fails +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js index c09dc943d0..7b16063703 100644 --- a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js +++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js @@ -32,7 +32,7 @@ if (String.prototype.localeCompare.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.localeCompare){ +for (var p in String.prototype.localeCompare){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A10.js b/test/built-ins/String/prototype/match/S15.5.4.10_A10.js index c15db2daef..973343e62f 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A10.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.10_A10 description: > Checking if varying the String.prototype.match.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js index 06c8d910b0..009ca6ab17 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js @@ -12,11 +12,9 @@ var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (match(__obj)[0] !=="AB") { - $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __str = "ABB\u0041BABAB"; match(__obj)[0] ==="AB". Actual: '+match(__obj)[0] ); + if (__str.match(__obj)[0] !=="AB") { + $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __str = "ABB\u0041BABAB"; __str.match(__obj)[0] ==="AB". Actual: '+__str.match(__obj)[0] ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js index bcf3d44d3c..2f4649a478 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js @@ -11,21 +11,17 @@ includes: [$FAIL.js] ---*/ var __obj = {toString:function(){throw "intostr";}} -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = match(__obj); - $FAIL('#1: "var x = match(__obj)" lead to throwing exception'); + var x = __str.match(__obj); + $FAIL('#1: "var x = __str.match(__obj)" lead to throwing exception'); } catch (e) { if (e!=="intostr") { $ERROR('#1.1: Exception === "intostr". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js index 3a9a6bf4f2..5b4c0bd0b9 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js @@ -15,15 +15,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = match(__obj); - $FAIL('#1: "var x = match(__obj)" lead to throwing exception'); + var x = __str.match(__obj); + $FAIL('#1: "var x = __str.match(__obj)" lead to throwing exception'); } catch (e) { if (e!=="intostr") { $ERROR('#1.1: Exception === "intostr". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A8.js b/test/built-ins/String/prototype/match/S15.5.4.10_A8.js index 9f38ffa795..3e24899ef1 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A8.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A8.js @@ -31,7 +31,7 @@ if (String.prototype.match.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.match){ +for (var p in String.prototype.match){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/replace/15.5.4.11-1.js b/test/built-ins/String/prototype/replace/15.5.4.11-1.js index f6d06993a4..c9507136d5 100644 --- a/test/built-ins/String/prototype/replace/15.5.4.11-1.js +++ b/test/built-ins/String/prototype/replace/15.5.4.11-1.js @@ -9,6 +9,7 @@ es5id: 15.5.4.11-1 description: > 'this' object used by the replaceValue function of a String.prototype.replace invocation +flags: [noStrict] includes: - runTestCase.js - fnGlobalObject.js diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js index b599c2f3d5..f838683e47 100644 --- a/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.11_A10 description: > Checking if varying the String.prototype.replace.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js index fb4de5518e..552c478fff 100644 --- a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js @@ -16,11 +16,9 @@ var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (replace(__obj, function(){return x;}) !== "undefinedBABABAB") { - $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __str = "ABB\u0041BABAB"; replace(__obj, function(){return x;}) === "undefinedBABABAB". Actual: '+replace(__obj, function(){return x;}) ); + if (__str.replace(__obj, function(){return x;}) !== "undefinedBABABAB") { + $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __str = "ABB\u0041BABAB"; replace(__obj, function(){return x;}) === "undefinedBABABAB". Actual: '+__str.replace(__obj, function(){return x;}) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js index 5f1994c4af..fd4e3c4f77 100644 --- a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js @@ -13,21 +13,17 @@ includes: [$FAIL.js] var __obj = {toString:function(){throw "insearchValue";}}; var __obj2 = {toString:function(){throw "inreplaceValue";}}; -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = replace(__obj,__obj2); - $FAIL('#1: "var x = replace(__obj,__obj2)" lead to throwing exception'); + var x = __str.replace(__obj,__obj2); + $FAIL('#1: "var x = __str.replace(__obj,__obj2)" lead to throwing exception'); } catch (e) { if (e!=="insearchValue") { $ERROR('#1.1: Exception === "insearchValue". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js index a655b1db8b..895d4c229a 100644 --- a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js @@ -18,15 +18,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = replace(__obj, __obj2); - $FAIL('#1: "var x = replace(__obj,__obj2)" lead to throwing exception'); + var x = __str.replace(__obj, __obj2); + $FAIL('#1: "var x = __str.replace(__obj,__obj2)" lead to throwing exception'); } catch (e) { if (e!=="insearchValue") { $ERROR('#1.1: Exception === "insearchValue". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js index af441ca3ca..804057ce1c 100644 --- a/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js @@ -29,9 +29,9 @@ if (String.prototype.replace.propertyIsEnumerable('length')) { ////////////////////////////////////////////////////////////////////////////// // CHECK#2 -count=0; +var count=0; -for (p in String.prototype.replace){ +for (var p in String.prototype.replace){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A10.js b/test/built-ins/String/prototype/search/S15.5.4.12_A10.js index b2dd99202f..afd98d43ff 100644 --- a/test/built-ins/String/prototype/search/S15.5.4.12_A10.js +++ b/test/built-ins/String/prototype/search/S15.5.4.12_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.12_A10 description: > Checking if varying the String.prototype.search.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js index 8aa9c6038f..8e6a7efc57 100644 --- a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js +++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js @@ -14,11 +14,9 @@ var __str = "ssABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (search(__obj) !==2) { - $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; var __str = "ssABB\u0041BABAB"; search(__obj) ===2. Actual: '+search(__obj) ); + if (__str.search(__obj) !==2) { + $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; var __str = "ssABB\u0041BABAB"; __str.search(__obj) ===2. Actual: '+__str.search(__obj) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js index 186e382159..0918761bcd 100644 --- a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js +++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js @@ -11,21 +11,17 @@ includes: [$FAIL.js] ---*/ var __obj = {toString:function(){throw "intostr";}} -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = search(__obj); - $FAIL('#1: var x = search(__obj) lead to throwing exception'); + var x = __str.search(__obj); + $FAIL('#1: var x = __str.search(__obj) lead to throwing exception'); } catch (e) { if (e!=="intostr") { $ERROR('#1.1: Exception === "intostr". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js index 6ea6becf77..80a86606ad 100644 --- a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js +++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js @@ -15,15 +15,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = search(__obj); - $FAIL('#1: var x = search(__obj) lead to throwing exception'); + var x = __str.search(__obj); + $FAIL('#1: var x = __str.search(__obj) lead to throwing exception'); } catch (e) { if (e!=="intostr") { $ERROR('#1.1: Exception === "intostr". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A8.js b/test/built-ins/String/prototype/search/S15.5.4.12_A8.js index bcaeddbc7e..073d33863f 100644 --- a/test/built-ins/String/prototype/search/S15.5.4.12_A8.js +++ b/test/built-ins/String/prototype/search/S15.5.4.12_A8.js @@ -31,7 +31,7 @@ if (String.prototype.search.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.search){ +for (var p in String.prototype.search){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js index 39e1be96ff..7aed6ca591 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.13_A10 description: > Checking if varying the String.prototype.slice.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js index 3697d188db..6f6100e611 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js @@ -15,11 +15,9 @@ var __str = "\u0035ABBBABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (slice(__obj, function(){return slice(0,1);}()) !== "BBB") { - $ERROR('#1: var x; var __obj = {valueOf:function(){return 2;}}; var __str = "\u0035ABBBABAB"; slice(__obj, function(){return slice(0,1);}()) === "BBB". Actual: '+slice(__obj, function(){return slice(0,1);}()) ); + if (__str.slice(__obj, function(){return __str.slice(0,1);}()) !== "BBB") { + $ERROR('#1: var x; var __obj = {valueOf:function(){return 2;}}; var __str = "\u0035ABBBABAB"; __str.slice(__obj, function(){return __str.slice(0,1);}()) === "BBB". Actual: '+__str.slice(__obj, function(){return __str.slice(0,1);}()) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js index b63f85f0a6..bc472297e0 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js @@ -12,21 +12,17 @@ includes: [$FAIL.js] var __obj = {valueOf:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = slice(__obj,__obj2); - $FAIL('#1: "var x = slice(__obj,__obj2)" lead to throwing exception'); + var x = __str.slice(__obj,__obj2); + $FAIL('#1: "var x = __str.slice(__obj,__obj2)" lead to throwing exception'); } catch (e) { if (e!=="instart") { $ERROR('#1.1: Exception === "instart". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js index 00339123af..1ce363b2d9 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js @@ -18,15 +18,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = slice(__obj, __obj2); - $FAIL('#1: "var x = slice(__obj,__obj2)" lead to throwing exception'); + var x = __str.slice(__obj, __obj2); + $FAIL('#1: "var x = __str.slice(__obj,__obj2)" lead to throwing exception'); } catch (e) { if (e!=="instart") { $ERROR('#1.1: Exception === "instart". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js index 89a92a2201..106fd8a1ec 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js @@ -9,7 +9,7 @@ description: > String(object), object have overrided toString function ---*/ -__obj = {toString:function(){}}; +var __obj = {toString:function(){}}; //since void 0 yelds 0 ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js index 4b644092c5..b6e6e1e60e 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js @@ -31,7 +31,7 @@ if (String.prototype.slice.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.slice){ +for (var p in String.prototype.slice){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A10.js index aa108fb5a3..b6139de201 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A10.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.14_A10 description: > Checking if varying the String.prototype.split.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js index 63bfb01301..209a68b8b9 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js @@ -19,14 +19,12 @@ var __obj = {toString:function(){return "\u0042B";}} var __obj2 = {valueOf:function(){return true;}} var __str = "ABB\u0041BABAB"; -with(__str){ - __split = split(__obj, __obj2); -} +var __split = __str.split(__obj, __obj2); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (typeof __split !== "object") { - $ERROR('#1: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; typeof __split === "object". Actual: '+typeof __split ); + $ERROR('#1: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); typeof __split === "object". Actual: '+typeof __split ); } // ////////////////////////////////////////////////////////////////////////////// @@ -34,7 +32,7 @@ if (typeof __split !== "object") { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (__split.constructor !== Array) { - $ERROR('#2: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; __split.constructor === Array. Actual: '+__split.constructor ); + $ERROR('#2: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); __split.constructor === Array. Actual: '+__split.constructor ); } // ////////////////////////////////////////////////////////////////////////////// @@ -42,7 +40,7 @@ if (__split.constructor !== Array) { ////////////////////////////////////////////////////////////////////////////// //CHECK#3 if (__split.length !== 1) { - $ERROR('#3: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; __split.length === 1. Actual: '+__split.length ); + $ERROR('#3: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); __split.length === 1. Actual: '+__split.length ); } // ////////////////////////////////////////////////////////////////////////////// @@ -50,7 +48,7 @@ if (__split.length !== 1) { ////////////////////////////////////////////////////////////////////////////// //CHECK#4 if (__split[0] !== "A") { - $ERROR('#4: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; __split[0] === "A". Actual: '+__split[0] ); + $ERROR('#4: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); __split[0] === "A". Actual: '+__split[0] ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js index c1d8648e0c..bc03182d63 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js @@ -18,21 +18,17 @@ includes: [$FAIL.js] var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){throw "intointeger";}} -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = split(__obj, __obj2); - $FAIL('#1: "var x = split(__obj, __obj2)" lead to throwing exception'); + var x = __str.split(__obj, __obj2); + $FAIL('#1: "var x = __str.split(__obj, __obj2)" lead to throwing exception'); } catch (e) { if (e!=="intointeger") { $ERROR('#1.1: Exception === "intointeger". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js index 925be56d66..f0fd1cb9c7 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js @@ -22,15 +22,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = split(__obj, __obj2); - $FAIL('#1: "var x = split(__obj, __obj2)" lead to throwing exception'); + var x = __str.split(__obj, __obj2); + $FAIL('#1: "var x = __str.split(__obj, __obj2)" lead to throwing exception'); } catch (e) { if (e!=="intointeger") { $ERROR('#1.1: Exception === "intointeger". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js index d09c6ecdd4..c6c7d7bf36 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js @@ -23,15 +23,13 @@ Number.prototype.split=String.prototype.split; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__instance){ try { - var x = split(__obj, __obj2); - $FAIL('#1: "var x = split(__obj, __obj2)" lead to throwing exception'); + var x = __instance.split(__obj, __obj2); + $FAIL('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception'); } catch (e) { if (e!=="intoint") { $ERROR('#1.1: Exception === "intoint". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js index 080f5d2746..7d34d7b1a3 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js @@ -16,7 +16,7 @@ var __re = /\u0037\u0037/g; Number.prototype.split=String.prototype.split; -__split = 6776767677.006771122677555.split(__re); +var __split = 6776767677.006771122677555.split(__re); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A8.js b/test/built-ins/String/prototype/split/S15.5.4.14_A8.js index 153a0ad552..74328a4110 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A8.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A8.js @@ -31,7 +31,7 @@ if (String.prototype.split.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.split){ +for (var p in String.prototype.split){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js index 0a181faa2d..1d48b27e4d 100644 --- a/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js +++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js @@ -7,6 +7,7 @@ es5id: 15.5.4.15_A10 description: > Checking if varying the String.prototype.substring.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js index dcebf1082b..2770321ed8 100644 --- a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js +++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js @@ -15,11 +15,9 @@ var __str = "\u0035ABBBABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - if (substring(__obj, function(){return substring(0,1);}()) !== "BBB") { - $ERROR('#1: var __obj = {valueOf:function(){return 2;}}; var __str = "\u0035ABBBABAB"; substring(__obj, function(){return substring(0,1);}()) === "BBB". Actual: '+substring(__obj, function(){return substring(0,1);}()) ); + if (__str.substring(__obj, function(){return __str.substring(0,1);}()) !== "BBB") { + $ERROR('#1: var __obj = {valueOf:function(){return 2;}}; var __str = "\u0035ABBBABAB"; __str.substring(__obj, function(){return __str.substring(0,1);}()) === "BBB". Actual: '+__str.substring(__obj, function(){return __str.substring(0,1);}()) ); } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js index 1eb918c75b..cd471e3908 100644 --- a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js +++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js @@ -12,21 +12,17 @@ includes: [$FAIL.js] var __obj = {valueOf:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; -var __str = {str__:"ABB\u0041BABAB"}; +var __str = "ABB\u0041BABAB"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ - with(str__){ try { - var x = substring(__obj,__obj2); - $FAIL('#1: "var x = substring(__obj,__obj2)" lead to throw exception'); + var x = __str.substring(__obj,__obj2); + $FAIL('#1: "var x = __str.substring(__obj,__obj2)" lead to throw exception'); } catch (e) { if (e!=="instart") { $ERROR('#1.1: Exception === "instart". Actual: '+e); } } - } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js index 4590ef9e34..b9cdb36ca4 100644 --- a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js +++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js @@ -18,15 +18,13 @@ var __str = new String("ABB\u0041BABAB"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -with(__str){ try { - var x = substring(__obj, __obj2); - $FAIL('#1: "var x = substring(__obj,__obj2)" lead to throw exception'); + var x = __str.substring(__obj, __obj2); + $FAIL('#1: "var x = __str.substring(__obj,__obj2)" lead to throw exception'); } catch (e) { if (e!=="instart") { $ERROR('#1.1: Exception ==="instart". Actual: '+e); } } -} // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js index c9af9c15c0..57c534f137 100644 --- a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js +++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js @@ -9,6 +9,7 @@ es5id: 15.5.4.17_A10 description: > Checking if varying the String.prototype.toLocaleLowerCase.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js index a1f314bd6a..c91a71387c 100644 --- a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js +++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js @@ -9,6 +9,7 @@ es5id: 15.5.4.19_A10 description: > Checking if varying the String.prototype.toLocaleUpperCase.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js index c502bbd510..8f7966b7a6 100644 --- a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js +++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js @@ -9,6 +9,7 @@ es5id: 15.5.4.16_A10 description: > Checking if varying the String.prototype.toLowerCase.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js index f9619c8a8b..d5ed914c93 100644 --- a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js +++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js @@ -7,7 +7,7 @@ es5id: 15.5.4.16_A1_T2 description: Instance is Boolean object ---*/ -__instance = new Boolean; +var __instance = new Boolean; __instance.toLowerCase = String.prototype.toLowerCase; diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js index a8439e5527..6b9ed0cdd8 100644 --- a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js +++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js @@ -33,7 +33,7 @@ if (String.prototype.toLowerCase.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.toLowerCase){ +for (var p in String.prototype.toLowerCase){ if (p==="length") count++; } diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js index af453646f7..b2cf13f571 100644 --- a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js +++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js @@ -9,6 +9,7 @@ es5id: 15.5.4.18_A10 description: > Checking if varying the String.prototype.toUpperCase.length property fails +flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js index 15e5053796..1705ca5847 100644 --- a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js +++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js @@ -33,7 +33,7 @@ if (String.prototype.toUpperCase.propertyIsEnumerable('length')) { // CHECK#2 var count=0; -for (p in String.prototype.toUpperCase){ +for (var p in String.prototype.toUpperCase){ if (p==="length") count++; }