diff options
Diffstat (limited to 'test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js')
-rw-r--r-- | test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js index 64ad57b26..eff95ed19 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js @@ -19,7 +19,7 @@ var __split = __string.split(123); ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (__split.constructor !== Array) { - $ERROR('#1: var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __split.constructor === Array. Actual: '+__split.constructor ); + $ERROR('#1: var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __split.constructor === Array. Actual: ' + __split.constructor); } // ////////////////////////////////////////////////////////////////////////////// @@ -27,17 +27,17 @@ if (__split.constructor !== Array) { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (__split.length !== __expected.length) { - $ERROR('#2: var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __split.length === __expected.length. Actual: '+__split.length ); + $ERROR('#2: var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __split.length === __expected.length. Actual: ' + __split.length); } // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// //CHECK#3 -for ( var i = 0; i < __expected.length; i++ ) { - if (__expected[i]!==__split[i]) { - $ERROR('#3.'+i+': var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __expected['+i+']===__split['+i+']. Actual: '+__expected[i]); - } +for (var i = 0; i < __expected.length; i++) { + if (__expected[i] !== __split[i]) { + $ERROR('#3.' + i + ': var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __expected[' + i + ']===__split[' + i + ']. Actual: ' + __expected[i]); + } } // ////////////////////////////////////////////////////////////////////////////// |