diff options
Diffstat (limited to 'test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js')
-rw-r--r-- | test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js index f74970094..8efdfb328 100644 --- a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js +++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js @@ -10,18 +10,29 @@ description: > overrided toString function, that return exception ---*/ -var __obj = {valueOf:function(){return {};}, toString:function(){return 1;}}; -var __obj2 = {toString:function(){throw "inend";}}; +var __obj = { + valueOf: function() { + return {}; + }, + toString: function() { + return 1; + } +}; +var __obj2 = { + toString: function() { + throw "inend"; + } +}; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 try { - var x = "ABB\u0041BABAB\u0031BBAA".substring(__obj, __obj2); - $ERROR('#1: var x = "ABB\\u0041BABAB\\u0031BBAA".substring(__obj,__obj2) lead to throw exception'); + var x = "ABB\u0041BABAB\u0031BBAA".substring(__obj, __obj2); + $ERROR('#1: var x = "ABB\\u0041BABAB\\u0031BBAA".substring(__obj,__obj2) lead to throw exception'); } catch (e) { - if (e!=="inend") { - $ERROR('#1.1: Exception === "inend". Actual: '+e); - } + if (e !== "inend") { + $ERROR('#1.1: Exception === "inend". Actual: ' + e); + } } // ////////////////////////////////////////////////////////////////////////////// |