diff options
Diffstat (limited to 'test/built-ins/String/S15.5.2.1_A1_T7.js')
-rw-r--r-- | test/built-ins/String/S15.5.2.1_A1_T7.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/built-ins/String/S15.5.2.1_A1_T7.js b/test/built-ins/String/S15.5.2.1_A1_T7.js index 5ce2ae1ac..9ff917a50 100644 --- a/test/built-ins/String/S15.5.2.1_A1_T7.js +++ b/test/built-ins/String/S15.5.2.1_A1_T7.js @@ -11,7 +11,9 @@ description: Creating string object with "new String({})" var __stored__Object__prototype__toString = Object.prototype.toString; -Object.prototype.toString=function(){return "SHIFTED"}; +Object.prototype.toString = function() { + return "SHIFTED" +}; var __str = new String({}); @@ -20,7 +22,7 @@ Object.prototype.toString = __stored__Object__prototype__toString; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (typeof __str !== "object") { - $ERROR('#1: __str = new String({}); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); + $ERROR('#1: __str = new String({}); typeof __str === "object". Actual: typeof __str ===' + typeof __str); } // ////////////////////////////////////////////////////////////////////////////// @@ -28,15 +30,15 @@ if (typeof __str !== "object") { ////////////////////////////////////////////////////////////////////////////// //CHECK#1.5 if (__str.constructor !== String) { - $ERROR('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); + $ERROR('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor); } // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// //CHECK#2 -if (__str !="SHIFTED") { - $ERROR('#2: Object.prototype.toString=function(){return "SHIFTED"}; __str = new String({}); __str =="SHIFTED". Actual: __str =='+__str ); +if (__str != "SHIFTED") { + $ERROR('#2: Object.prototype.toString=function(){return "SHIFTED"}; __str = new String({}); __str =="SHIFTED". Actual: __str ==' + __str); } // ////////////////////////////////////////////////////////////////////////////// |