diff options
Diffstat (limited to 'test/built-ins/String/prototype/charAt')
22 files changed, 58 insertions, 74 deletions
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 79c9d0ec5..a89daec9b 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 @@ -7,11 +7,7 @@ es5id: 15.5.4.4_A1.1 description: Checking by using eval ---*/ -function __FACTORY() { - this.toString = function() { - return "wizard"; - }; -}; +function __FACTORY(){this.toString = function(){ return "wizard";};}; __FACTORY.prototype.charAt = String.prototype.charAt; @@ -19,8 +15,8 @@ var __instance = new __FACTORY; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -if (__instance.charAt(eval("1"), true, null, {}) !== "i") { - $ERROR('#1: __instance.charAt(eval("1"),true,null,{})=== "i". Actual: ' + __instance.charAt(eval("1"), true, null, {})); -} + 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 21de5fc4c..ad3379461 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 @@ -13,21 +13,19 @@ includes: [propertyHelper.js] ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (!(String.prototype.charAt.hasOwnProperty('length'))) { - $ERROR('#1: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.charAt.hasOwnProperty('length')); + $ERROR('#1: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); } // ////////////////////////////////////////////////////////////////////////////// var __obj = String.prototype.charAt.length; -verifyNotWritable(String.prototype.charAt, "length", null, function() { - return "shifted"; -}); +verifyNotWritable(String.prototype.charAt, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (String.prototype.charAt.length !== __obj) { - $ERROR('#2: __obj = String.prototype.charAt.length; String.prototype.charAt.length = function(){return "shifted";}; String.prototype.charAt.length === __obj. Actual: ' + String.prototype.charAt.length); + $ERROR('#2: __obj = String.prototype.charAt.length; String.prototype.charAt.length = function(){return "shifted";}; String.prototype.charAt.length === __obj. Actual: '+String.prototype.charAt.length ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js index 2d376a2dc..bb5b5cb34 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js @@ -10,7 +10,7 @@ description: Checking String.prototype.charAt.length ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (!(String.prototype.charAt.hasOwnProperty("length"))) { - $ERROR('#1: String.prototype.charAt.hasOwnProperty("length") return true. Actual: ' + String.prototype.charAt.hasOwnProperty("length")); + $ERROR('#1: String.prototype.charAt.hasOwnProperty("length") return true. Actual: '+String.prototype.charAt.hasOwnProperty("length")); } // ////////////////////////////////////////////////////////////////////////////// @@ -18,7 +18,7 @@ if (!(String.prototype.charAt.hasOwnProperty("length"))) { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (String.prototype.charAt.length !== 1) { - $ERROR('#2: String.prototype.charAt.length === 1. Actual: ' + String.prototype.charAt.length); + $ERROR('#2: String.prototype.charAt.length === 1. Actual: '+String.prototype.charAt.length ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T1.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T1.js index c47d9c5c5..d88cec69a 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T1.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T1.js @@ -13,8 +13,8 @@ __instance.charAt = String.prototype.charAt; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -if (__instance.charAt(false) + __instance.charAt(true) !== "42") { - $ERROR('#1: __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true) === "42". Actual: ' + __instance.charAt(false) + __instance.charAt(true)); +if (__instance.charAt(false)+__instance.charAt(true) !== "42") { + $ERROR('#1: __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true) === "42". Actual: '+__instance.charAt(false)+__instance.charAt(true) ); } // ////////////////////////////////////////////////////////////////////////////// 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 10c5d32b2..b92349adc 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 @@ -7,17 +7,13 @@ es5id: 15.5.4.4_A1_T10 description: Call charAt() function with object argument ---*/ -var __obj = { - toString: function() { - return 1; - } -} +var __obj = {toString:function(){return 1;}} var __str = "lego"; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -if (__str.charAt(__obj) !== "e") { - $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charAt(__obj) === "e". Actual: ' + __str.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_A1_T2.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T2.js index 39930f228..42ad5f81b 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T2.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T2.js @@ -13,8 +13,8 @@ __instance.charAt = String.prototype.charAt; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -if (__instance.charAt(false) + __instance.charAt(true) + __instance.charAt(true + 1) !== "fal") { - $ERROR('#1: __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) === "fal". Actual: ' + __instance.charAt(false) + __instance.charAt(true) + __instance.charAt(true + 1)); +if (__instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) !== "fal") { + $ERROR('#1: __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) === "fal". Actual: '+__instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T4.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T4.js index c69163edf..6296bb163 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T4.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T4.js @@ -11,7 +11,7 @@ description: Call charAt() function without argument of string object //CHECK#1 //since ToInteger() evaluates to 0 charAt() evaluates to charAt(0) if ("lego".charAt() !== "l") { - $ERROR('#1: "lego".charAt() === "l". Actual: "lego".charAt() ===' + ("lego".charAt())); + $ERROR('#1: "lego".charAt() === "l". Actual: "lego".charAt() ==='+("lego".charAt()) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T5.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T5.js index dcf127bde..f3d40ae7a 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T5.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T5.js @@ -10,12 +10,8 @@ description: Call charAt() function with null argument of function object ////////////////////////////////////////////////////////////////////////////// //CHECK#1 //since ToInteger(null) evaluates to 0 charAt() evaluates to charAt(0) -if (function() { - return "lego" - }().charAt(null) !== "l") { - $ERROR('#1: function(){return "lego"}().charAt(null) === "l". Actual: function(){return "lego"}().charAt(null) ===' + function() { - return "lego" - }().charAt(null)); +if (function(){return "lego"}().charAt(null) !== "l") { + $ERROR('#1: function(){return "lego"}().charAt(null) === "l". Actual: function(){return "lego"}().charAt(null) ==='+function(){return "lego"}().charAt(null) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T6.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T6.js index e611efe88..73d3ab390 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T6.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T6.js @@ -13,7 +13,7 @@ description: > //CHECK#1 //since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0) if (new String("lego").charAt(x) !== "l") { - $ERROR('#1: var x; new String("lego").charAt(x) === "l". Actual: new String("lego").charAt(x) ===' + new String("lego").charAt(x)); + $ERROR('#1: var x; new String("lego").charAt(x) === "l". Actual: new String("lego").charAt(x) ==='+new String("lego").charAt(x) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T7.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T7.js index ed0b9c4e5..067418236 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T7.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T7.js @@ -11,7 +11,7 @@ description: Call charAt() function with undefined argument of string object //CHECK#1 //since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0) if (String("lego").charAt(undefined) !== "l") { - $ERROR('#1: String("lego").charAt(undefined) === "l". Actual: String("lego").charAt(undefined) ===' + String("lego").charAt(undefined)); + $ERROR('#1: String("lego").charAt(undefined) === "l". Actual: String("lego").charAt(undefined) ==='+String("lego").charAt(undefined) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T8.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T8.js index cb5f85ffc..ef0d83882 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T8.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T8.js @@ -11,7 +11,7 @@ description: Call charAt() function with void 0 argument of string object //CHECK#1 //since ToInteger(void 0) evaluates to 0 charAt() evaluates to charAt(0) if (String(42).charAt(void 0) !== "4") { - $ERROR('#1: String(42).charAt(void 0) === "4". Actual: String(42).charAt(void 0) ===' + String(42).charAt(void 0)); + $ERROR('#1: String(42).charAt(void 0) === "4". Actual: String(42).charAt(void 0) ==='+String(42).charAt(void 0) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T9.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T9.js index 46f5c6d60..6137d3e04 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T9.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T9.js @@ -12,8 +12,8 @@ description: > ////////////////////////////////////////////////////////////////////////////// //CHECK#1 //since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0) -if (new String(42).charAt(function() {}()) !== "4") { - $ERROR('#1: new String(42).charAt(function(){}()) === "4". Actual: new String(42).charAt(function(){}()) ===' + new String(42).charAt(function() {}())); +if (new String(42).charAt(function(){}()) !== "4") { + $ERROR('#1: new String(42).charAt(function(){}()) === "4". Actual: new String(42).charAt(function(){}()) ==='+new String(42).charAt(function(){}()) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A2.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A2.js index b83c11f8d..9616be531 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A2.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A2.js @@ -9,7 +9,7 @@ es5id: 15.5.4.4_A2 description: Call charAt(pos) with negative pos ---*/ -function __FACTORY() {}; +function __FACTORY(){}; __FACTORY.prototype.charAt = String.prototype.charAt; @@ -18,7 +18,7 @@ var __instance = new __FACTORY; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (__instance.charAt(-1) !== "") { - $ERROR('#1: __instance.charAt(-1) === "". Actual: __instance.charAt(-1) ===' + __instance.charAt(-1)); + $ERROR('#1: __instance.charAt(-1) === "". Actual: __instance.charAt(-1) ==='+__instance.charAt(-1) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A3.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A3.js index daf222d95..185d7950d 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A3.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A3.js @@ -14,7 +14,7 @@ var __instance = new String("ABC"); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (__instance.charAt(3) !== "") { - $ERROR('#1: __instance = new String("ABC"); __instance.charAt(3) === "". Actual: __instance.charAt(3) ===' + __instance.charAt(3)); + $ERROR('#1: __instance = new String("ABC"); __instance.charAt(3) === "". Actual: __instance.charAt(3) ==='+__instance.charAt(3) ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T1.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T1.js index bc71de8a5..5216b646e 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T1.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T1.js @@ -11,11 +11,11 @@ description: Compare results of x.charAt(pos) and x.substring(pos, pos+1) ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -for (var i = 0; i < 6; i++) { - if ("ABC\u0041\u0042\u0043".charAt(i) !== "\u0041\u0042\u0043ABC".substring(i, i + 1)) { - $ERROR('#' + i + ': "ABC\\u0041\\u0042\\u0043".charAt(' + i + ') === "\\u0041\\u0042\\u0043ABC".substring(' + i + ', ' + (i + 1) + '). Actual: "ABC\\u0041\\u0042\\u0043".charAt(' + i + ') ===' + ("ABC\u0041\u0042\u0043".charAt(i))); - } +for(var i=0; i<6; i++) { + if ("ABC\u0041\u0042\u0043".charAt(i) !== "\u0041\u0042\u0043ABC".substring(i, i+1)) { + $ERROR('#'+i+': "ABC\\u0041\\u0042\\u0043".charAt('+i+') === "\\u0041\\u0042\\u0043ABC".substring('+i+', '+(i+1)+'). Actual: "ABC\\u0041\\u0042\\u0043".charAt('+i+') ==='+("ABC\u0041\u0042\u0043".charAt(i)) ); + } } - + // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T2.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T2.js index 79556c519..0771bc7f5 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T2.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T2.js @@ -13,11 +13,11 @@ description: > ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -for (var i = -2; i < 0; i++) { - if ("ABC\u0041\u0042\u0043".charAt(i) !== "\u0041\u0042\u0043ABC".substring(i, i + 1)) { - $ERROR('#' + (i + 2) + ': "ABC\\u0041\\u0042\\u0043".charAt(' + i + ') === "\\u0041\\u0042\\u0043ABC".substring(' + i + ', ' + (i + 1) + '). Actual: "ABC\\u0041\\u0042\\u0043".charAt(' + i + ') ===' + ("ABC\u0041\u0042\u0043".charAt(i))); - } +for(var i=-2; i<0; i++) { + if ("ABC\u0041\u0042\u0043".charAt(i) !== "\u0041\u0042\u0043ABC".substring(i, i+1)) { + $ERROR('#'+(i+2)+': "ABC\\u0041\\u0042\\u0043".charAt('+i+') === "\\u0041\\u0042\\u0043ABC".substring('+i+', '+(i+1)+'). Actual: "ABC\\u0041\\u0042\\u0043".charAt('+i+') ==='+("ABC\u0041\u0042\u0043".charAt(i)) ); + } } - + // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T3.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T3.js index 3f3665233..ab0ddbffa 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T3.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T3.js @@ -13,11 +13,11 @@ description: > ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -for (var i = 6; i < 8; i++) { - if ("ABC\u0041\u0042\u0043".charAt(i) !== "\u0041\u0042\u0043ABC".substring(i, i + 1)) { - $ERROR('#' + (i - 5) + ': "ABC\\u0041\\u0042\\u0043".charAt(' + i + ') === "\\u0041\\u0042\\u0043ABC".substring(' + i + ', ' + (i + 1) + '). Actual: "ABC\\u0041\\u0042\\u0043".charAt(' + i + ') ===' + ("ABC\u0041\u0042\u0043".charAt(i))); - } +for(var i=6; i<8; i++) { + if ("ABC\u0041\u0042\u0043".charAt(i) !== "\u0041\u0042\u0043ABC".substring(i, i+1)) { + $ERROR('#'+(i-5)+': "ABC\\u0041\\u0042\\u0043".charAt('+i+') === "\\u0041\\u0042\\u0043ABC".substring('+i+', '+(i+1)+'). Actual: "ABC\\u0041\\u0042\\u0043".charAt('+i+') ==='+("ABC\u0041\u0042\u0043".charAt(i))); + } } - + // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A5.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A5.js index fadadc996..266fc6ae1 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A5.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A5.js @@ -9,12 +9,10 @@ es5id: 15.5.4.4_A5 description: Change toString function, it trow exception, and call charAt() ---*/ -var __obj = { - valueOf: 1, - toString: function() { - throw 'intostring' - }, - charAt: String.prototype.charAt +var __obj={ + valueOf:1, + toString:function(){throw 'intostring'}, + charAt:String.prototype.charAt } ////////////////////////////////////////////////////////////////////////////// @@ -24,7 +22,7 @@ try { $ERROR('#1: __obj={valueOf:1,toString:function(){throw \'intostring\'},charAt:String.prototype.charAt}; "var x = __obj.charAt()" lead to throwing exception'); } catch (e) { if (e !== 'intostring') { - $ERROR('#1.1: Exception === \'intostring\'. Actual: exception ===' + e); + $ERROR('#1.1: Exception === \'intostring\'. Actual: exception ==='+e ); } } // diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A6.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A6.js index a5a00a328..1e3114e6a 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A6.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A6.js @@ -10,7 +10,7 @@ description: Checking String.prototype.charAt.prototype ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (String.prototype.charAt.prototype !== undefined) { - $ERROR('#1: String.prototype.charAt.prototype === undefined. Actual: ' + String.prototype.charAt.prototype); + $ERROR('#1: String.prototype.charAt.prototype === undefined. Actual: '+String.prototype.charAt.prototype ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A7.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A7.js index a43cc85f4..5afab205b 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A7.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A7.js @@ -14,6 +14,6 @@ try { $ERROR('#1: __FACTORY = String.prototype.charAt; "__instance = new __FACTORY" lead to throwing exception'); } catch (e) { if ((e instanceof TypeError) !== true) { - $ERROR('#1.2: undefined = 1 throw a TypeError. Actual: ' + (e)); + $ERROR('#1.2: undefined = 1 throw a TypeError. Actual: ' + (e)); } } 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 d18cf8044..51dc2ca11 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 @@ -12,7 +12,7 @@ description: > ////////////////////////////////////////////////////////////////////////////// //CHECK#0 if (!(String.prototype.charAt.hasOwnProperty('length'))) { - $ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.charAt.hasOwnProperty('length')); + $ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); } // ////////////////////////////////////////////////////////////////////////////// @@ -21,21 +21,21 @@ if (!(String.prototype.charAt.hasOwnProperty('length'))) { ////////////////////////////////////////////////////////////////////////////// // CHECK#1 if (String.prototype.charAt.propertyIsEnumerable('length')) { - $ERROR('#1: String.prototype.charAt.propertyIsEnumerable(\'length\') return false. Actual: ' + String.prototype.charAt.propertyIsEnumerable('length')); + $ERROR('#1: String.prototype.charAt.propertyIsEnumerable(\'length\') return false. Actual: '+String.prototype.charAt.propertyIsEnumerable('length')); } // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // CHECK#2 -var count = 0; +var count=0; -for (var p in String.prototype.charAt) { - if (p === "length") count++; +for (var p in String.prototype.charAt){ + if (p==="length") count++; } if (count !== 0) { - $ERROR('#2: count=0; for (p in String.prototype.charAt){if (p==="length") count++;}; count === 0. Actual: count ===' + count); + $ERROR('#2: count=0; for (p in String.prototype.charAt){if (p==="length") count++;}; count === 0. Actual: count ==='+count ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A9.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A9.js index 6414fbe44..9e3d36bee 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A9.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A9.js @@ -14,7 +14,7 @@ description: > ////////////////////////////////////////////////////////////////////////////// //CHECK#0 if (!(String.prototype.charAt.hasOwnProperty('length'))) { - $ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.charAt.hasOwnProperty('length')); + $ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); } // ////////////////////////////////////////////////////////////////////////////// @@ -30,7 +30,7 @@ if (!delete String.prototype.charAt.length) { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (String.prototype.charAt.hasOwnProperty('length')) { - $ERROR('#2: delete String.prototype.charAt.length; String.prototype.charAt.hasOwnProperty(\'length\') return false. Actual: ' + String.prototype.charAt.hasOwnProperty('length')); + $ERROR('#2: delete String.prototype.charAt.length; String.prototype.charAt.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.charAt.hasOwnProperty('length')); } // ////////////////////////////////////////////////////////////////////////////// |