diff options
Diffstat (limited to 'test/built-ins/String/S15.5.2.1_A1_T8.js')
-rw-r--r-- | test/built-ins/String/S15.5.2.1_A1_T8.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/built-ins/String/S15.5.2.1_A1_T8.js b/test/built-ins/String/S15.5.2.1_A1_T8.js index c01b4bb1e..35402bae1 100644 --- a/test/built-ins/String/S15.5.2.1_A1_T8.js +++ b/test/built-ins/String/S15.5.2.1_A1_T8.js @@ -11,18 +11,16 @@ description: Creating string object with "new String(function(){})" var __stored__Function__prototype__toString = Function.prototype.toString; -Function.prototype.toString = function() { - return "SHIFTED" -}; +Function.prototype.toString=function(){return "SHIFTED"}; -var __str = new String(function() {}); +var __str = new String(function(){}); Function.prototype.toString = __stored__Function__prototype__toString; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (typeof __str !== "object") { - $ERROR('#1: __str = new String(function(){}); typeof __str === "object". Actual: typeof __str ===' + typeof __str); + $ERROR('#1: __str = new String(function(){}); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); } // ////////////////////////////////////////////////////////////////////////////// @@ -30,15 +28,15 @@ if (typeof __str !== "object") { ////////////////////////////////////////////////////////////////////////////// //CHECK#1.5 if (__str.constructor !== String) { - $ERROR('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor); + $ERROR('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); } // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// //CHECK#2 -if (__str != "SHIFTED") { - $ERROR('#2: Function.prototype.toString=function(){return "SHIFTED"}; __str = new String(function(){}); __str =="SHIFTED". Actual: __str ==' + __str); +if (__str !="SHIFTED") { + $ERROR('#2: Function.prototype.toString=function(){return "SHIFTED"}; __str = new String(function(){}); __str =="SHIFTED". Actual: __str =='+__str ); } // ////////////////////////////////////////////////////////////////////////////// |