summaryrefslogtreecommitdiff
path: root/test/built-ins/String/prototype
diff options
context:
space:
mode:
authorBrian Terlson <brian.terlson@microsoft.com>2014-12-05 15:50:00 -0800
committerBrian Terlson <brian.terlson@microsoft.com>2014-12-07 15:33:09 -0800
commit2a74f0ec1b671f15fc7df3e1e294a65abc8ebac8 (patch)
tree7315f60ffd86513bf163c05e4252fab0810bfbe8 /test/built-ins/String/prototype
parentda465e7399bcecd3c78fa1f5e898c9d52b4c7096 (diff)
downloadqtdeclarative-testsuites-2a74f0ec1b671f15fc7df3e1e294a65abc8ebac8.tar.gz
Reorganize ./test
Diffstat (limited to 'test/built-ins/String/prototype')
-rw-r--r--test/built-ins/String/prototype/S15.5.3.1_A1.js16
-rw-r--r--test/built-ins/String/prototype/S15.5.3.1_A2.js41
-rw-r--r--test/built-ins/String/prototype/S15.5.3.1_A3.js27
-rw-r--r--test/built-ins/String/prototype/S15.5.3.1_A4.js29
-rw-r--r--test/built-ins/String/prototype/S15.5.4_A1.js23
-rw-r--r--test/built-ins/String/prototype/S15.5.4_A2.js23
-rw-r--r--test/built-ins/String/prototype/S15.5.4_A3.js28
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1.1.js24
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js30
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js24
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T10.js21
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T2.js20
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T4.js17
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T7.js17
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T8.js17
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T9.js19
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A2.js24
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A3.js20
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T1.js21
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T2.js23
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T3.js23
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A5.js30
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A6.js16
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A7.js20
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A8.js41
-rw-r--r--test/built-ins/String/prototype/charAt/S15.5.4.4_A9.js36
-rw-r--r--test/built-ins/String/prototype/charAt/S9.4_A1.js20
-rw-r--r--test/built-ins/String/prototype/charAt/S9.4_A2.js22
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js25
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js30
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A11.js24
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js21
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T2.js36
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T4.js17
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T7.js17
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T8.js17
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T9.js19
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A2.js24
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A3.js20
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A4.js30
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A6.js16
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A7.js20
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js42
-rw-r--r--test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A9.js37
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A10.js30
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A11.js24
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js25
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T2.js22
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T4.js17
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T5.js19
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T7.js19
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T8.js19
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A1_T9.js19
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A2.js29
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A3.js20
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A4_T1.js24
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A4_T2.js31
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A6.js16
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A7.js20
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A8.js42
-rw-r--r--test/built-ins/String/prototype/concat/S15.5.4.6_A9.js37
-rw-r--r--test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T1.js18
-rw-r--r--test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T2.js50
-rw-r--r--test/built-ins/String/prototype/contains/String.prototype.contains_FailBadLocation.js20
-rw-r--r--test/built-ins/String/prototype/contains/String.prototype.contains_FailLocation.js20
-rw-r--r--test/built-ins/String/prototype/contains/String.prototype.contains_FailMissingLetter.js18
-rw-r--r--test/built-ins/String/prototype/contains/String.prototype.contains_Success.js20
-rw-r--r--test/built-ins/String/prototype/contains/String.prototype.contains_SuccessNoLocation.js20
-rw-r--r--test/built-ins/String/prototype/contains/String.prototype.contains_lengthProp.js18
-rw-r--r--test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail.js18
-rw-r--r--test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail_2.js20
-rw-r--r--test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success.js20
-rw-r--r--test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_2.js20
-rw-r--r--test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_3.js20
-rw-r--r--test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_4.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js31
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A11.js24
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js24
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T11.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T12.js26
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T2.js22
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T4.js19
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T5.js19
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T7.js19
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T8.js21
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T9.js24
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T1.js16
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T2.js16
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T3.js16
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T4.js16
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T1.js18
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T2.js18
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T3.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js32
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js32
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T3.js21
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js31
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T5.js40
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T1.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T2.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T3.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T4.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T5.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T6.js20
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A6.js16
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A7.js23
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js41
-rw-r--r--test/built-ins/String/prototype/indexOf/S15.5.4.7_A9.js37
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js33
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A11.js24
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js26
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T12.js26
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T2.js22
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T4.js19
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T5.js19
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T7.js19
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T8.js21
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T9.js24
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js32
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js32
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T3.js21
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js31
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T5.js40
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A6.js16
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A7.js20
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js44
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A9.js37
-rw-r--r--test/built-ins/String/prototype/localeCompare/15.5.4.9_3.js23
-rw-r--r--test/built-ins/String/prototype/localeCompare/15.5.4.9_CE.js84
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js32
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A11.js24
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T1.js27
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T2.js17
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A6.js16
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A7.js22
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js43
-rw-r--r--test/built-ins/String/prototype/localeCompare/S15.5.4.9_A9.js36
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A10.js31
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A11.js24
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js23
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js31
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js29
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T13.js28
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T14.js20
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T2.js22
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js24
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T4.js46
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T6.js50
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T7.js48
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T8.js48
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T9.js53
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T1.js42
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T10.js45
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T11.js45
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T12.js32
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T13.js33
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T14.js34
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T15.js35
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T16.js35
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T17.js48
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T18.js50
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T2.js30
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T3.js30
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T4.js30
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T5.js30
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T6.js60
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T7.js28
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T8.js44
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A2_T9.js45
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A6.js16
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A7.js20
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A8.js42
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A9.js37
-rw-r--r--test/built-ins/String/prototype/replace/15.5.4.11-1.js28
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A10.js31
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A11.js24
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A12.js24
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js27
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js33
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js32
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T13.js29
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T14.js18
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T15.js28
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T16.js32
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T17.js23
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T2.js24
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T4.js18
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T5.js18
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T7.js18
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T8.js20
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A1_T9.js25
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T1.js23
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T10.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T2.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T3.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T4.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T5.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T6.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T8.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A2_T9.js21
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js19
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js19
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js19
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A4_T1.js23
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A4_T2.js23
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A4_T3.js23
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A4_T4.js23
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A5_T1.js20
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A6.js16
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A7.js20
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A8.js42
-rw-r--r--test/built-ins/String/prototype/replace/S15.5.4.11_A9.js37
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1.1_T1.js16
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A10.js31
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A11.js24
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js25
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js31
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js29
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T13.js20
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T14.js18
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T2.js20
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T4.js21
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T6.js19
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T7.js17
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T8.js21
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A1_T9.js24
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T1.js18
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T2.js18
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T3.js18
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T4.js21
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T5.js21
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T6.js18
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A2_T7.js18
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A3_T1.js20
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A3_T2.js20
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A6.js16
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A7.js23
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A8.js42
-rw-r--r--test/built-ins/String/prototype/search/S15.5.4.12_A9.js37
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A10.js31
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A11.js24
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js26
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js32
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js32
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T13.js28
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T14.js16
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T15.js23
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T2.js24
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T4.js19
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T5.js27
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T6.js21
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T7.js17
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js21
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A1_T9.js25
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T1.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T2.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T3.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T4.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T5.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T6.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T7.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T8.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A2_T9.js18
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A3_T1.js20
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A3_T2.js22
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A3_T3.js22
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A3_T4.js28
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A6.js16
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A7.js20
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A8.js42
-rw-r--r--test/built-ins/String/prototype/slice/S15.5.4.13_A9.js37
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A10.js31
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A11.js24
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T1.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js56
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js38
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js36
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T13.js61
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js37
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T16.js29
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js75
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T18.js51
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T2.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T3.js61
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T4.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T5.js58
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T6.js50
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T7.js47
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T8.js51
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T9.js55
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T1.js72
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T11.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T12.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T13.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T14.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T15.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T16.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T17.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T18.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T19.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T2.js72
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T20.js42
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T21.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T22.js56
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T23.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T24.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T25.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T26.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T27.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T28.js40
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T29.js46
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T3.js48
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T30.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T31.js46
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T32.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T33.js46
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T34.js46
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T35.js46
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T36.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T37.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T38.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T39.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T4.js64
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T40.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T41.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T42.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T43.js44
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T5.js56
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T6.js42
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T7.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T8.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A2_T9.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T1.js39
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T10.js39
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T11.js39
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T2.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T3.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T4.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T5.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T6.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T7.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T8.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A3_T9.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T1.js57
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T10.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T11.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T12.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T13.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T14.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T15.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T16.js47
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T17.js47
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T18.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T19.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T2.js33
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T20.js47
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T21.js43
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T22.js47
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T23.js47
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T24.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T25.js45
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T3.js41
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T4.js49
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T5.js57
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T6.js57
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T7.js59
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T8.js33
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A4_T9.js59
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A6.js16
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A7.js20
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A8.js42
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A9.js37
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A10.js31
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A11.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js26
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js32
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js32
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js28
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T14.js16
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T15.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T2.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T4.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T5.js25
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T6.js20
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T7.js16
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T8.js20
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A1_T9.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T1.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T10.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T2.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T3.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T4.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T5.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T6.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T7.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T8.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A2_T9.js18
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T1.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T10.js29
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T11.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T2.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T3.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T4.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T5.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T6.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T7.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T8.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A3_T9.js24
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A6.js16
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A7.js23
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A8.js42
-rw-r--r--test/built-ins/String/prototype/substring/S15.5.4.15_A9.js37
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js33
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A11.js24
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T10.js21
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T11.js27
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T12.js27
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T13.js29
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T14.js19
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T2.js20
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T3.js16
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T4.js46
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T6.js18
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T7.js18
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T8.js14
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T9.js52
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A2_T1.js34
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A6.js16
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A7.js25
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A8.js44
-rw-r--r--test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A9.js37
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js33
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A11.js24
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T10.js21
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T11.js26
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T12.js26
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T13.js28
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T14.js18
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T2.js20
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T3.js16
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T4.js45
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T6.js18
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T7.js18
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T8.js14
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T9.js51
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A2_T1.js34
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A6.js16
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A7.js22
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A8.js44
-rw-r--r--test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A9.js37
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js33
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A11.js24
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T10.js22
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T11.js27
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T12.js27
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T13.js29
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T14.js19
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js20
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T3.js16
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T4.js46
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T6.js18
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T7.js18
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T8.js14
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T9.js51
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A2_T1.js32
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A6.js16
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A7.js20
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js44
-rw-r--r--test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A9.js37
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A1_T1.js18
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A1_T2.js18
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A1_T3.js18
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A1_T4.js18
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A2_T1.js36
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A2_T2.js36
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A3_T1.js30
-rw-r--r--test/built-ins/String/prototype/toString/S15.5.4.2_A4_T1.js18
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js33
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A11.js24
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T1.js20
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T10.js21
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T11.js26
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T12.js26
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T13.js29
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T14.js18
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T2.js20
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T3.js16
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T4.js46
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T5.js17
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T6.js18
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T7.js18
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T8.js14
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T9.js51
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A2_T1.js32
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A6.js16
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A7.js20
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js44
-rw-r--r--test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A9.js37
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-0-1.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-0-2.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-1.js24
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-2.js24
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-3.js23
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-4.js23
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-5.js23
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-6.js23
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-7.js23
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-8.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-1-9.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-1.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-10.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-11.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-12.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-13.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-14.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-15.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-16.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-17.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-18.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-19.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-2.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-20.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-21.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-22.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-23.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-24.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-25.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-26.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-27.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-28.js16
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-29.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-3.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-30.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-31.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-32.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-33.js16
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-34.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-35.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-36.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-37.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-38.js24
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-39.js24
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-4.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-40.js31
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-41.js30
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-42.js36
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-43.js38
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-44.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-45.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-46.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-47.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-49.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-5.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-50.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-51.js19
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-6.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-7.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-8.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-2-9.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-1.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-10.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-11.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-12.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-13.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-14.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-2.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-3.js22
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-4.js22
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-5.js22
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-6.js23
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-7.js22
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-8.js16
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-3-9.js16
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-1.js24
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-10.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-11.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-12.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-13.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-14.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-16.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-18.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-19.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-2.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-20.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-21.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-22.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-24.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-27.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-28.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-29.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-3.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-30.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-32.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-34.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-35.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-36.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-37.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-38.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-39.js18
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-4.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-40.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-41.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-42.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-43.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-44.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-45.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-46.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-47.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-48.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-49.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-5.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-50.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-51.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-52.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-53.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-54.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-55.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-56.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-57.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-58.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-59.js22
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-6.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-60.js20
-rw-r--r--test/built-ins/String/prototype/trim/15.5.4.20-4-8.js20
-rw-r--r--test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T1.js18
-rw-r--r--test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T2.js18
-rw-r--r--test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T3.js18
-rw-r--r--test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T4.js20
-rw-r--r--test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T1.js35
-rw-r--r--test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T2.js35
659 files changed, 17958 insertions, 0 deletions
diff --git a/test/built-ins/String/prototype/S15.5.3.1_A1.js b/test/built-ins/String/prototype/S15.5.3.1_A1.js
new file mode 100644
index 000000000..0c621f1e3
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.3.1_A1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String has property prototype
+es5id: 15.5.3.1_A1
+description: Checking String.hasOwnProperty('prototype')
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.hasOwnProperty('prototype'))) {
+ $ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/S15.5.3.1_A2.js b/test/built-ins/String/prototype/S15.5.3.1_A2.js
new file mode 100644
index 000000000..acb282a99
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.3.1_A2.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype property has the attribute DontEnum
+es5id: 15.5.3.1_A2
+description: Checking if enumerating the String.prototype property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.hasOwnProperty('prototype'))) {
+ $FAIL('#0: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.propertyIsEnumerable('prototype')) {
+ $ERROR('#1: String.propertyIsEnumerable(\'prototype\') return false. Actual: '+String.propertyIsEnumerable('prototype'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String){
+ if (p==="prototype") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String){ if (p==="prototype") count++;}; count === 0. Actual: count ==='+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/S15.5.3.1_A3.js b/test/built-ins/String/prototype/S15.5.3.1_A3.js
new file mode 100644
index 000000000..df2cfcffa
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.3.1_A3.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype property has the attribute DontDelete
+es5id: 15.5.3.1_A3
+description: Checking if deleting the String.prototype property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.hasOwnProperty('prototype'))) {
+ $FAIL('#1: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+delete String.prototype;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (!(String.hasOwnProperty('prototype'))) {
+ $ERROR('#2: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/S15.5.3.1_A4.js b/test/built-ins/String/prototype/S15.5.3.1_A4.js
new file mode 100644
index 000000000..0b7b94f26
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.3.1_A4.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype property has the attribute ReadOnly
+es5id: 15.5.3.1_A4
+description: Checking if varying the String.prototype property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.hasOwnProperty('prototype'))) {
+ $FAIL('#1: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype;
+
+String.prototype = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype !== __obj) {
+ $ERROR('#2: __obj = String.prototype; String.prototype = function(){return "shifted";}; String.prototype === __obj. Actual: String.prototype ==='+String.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/S15.5.4_A1.js b/test/built-ins/String/prototype/S15.5.4_A1.js
new file mode 100644
index 000000000..1b69a4ebd
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.4_A1.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String prototype object is itself not a String object (its [[Class]]
+ is "Object")
+es5id: 15.5.4_A1
+description: >
+ first we delete String.prototype.toString cause it overrides
+ Object prototype toString. Object.prototype.toString returns
+ [object+[[class]]+]
+---*/
+
+delete String.prototype.toString;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.toString() !== "[object "+"Object"+"]") {
+ $ERROR('#1: delete String.prototype.toString; String.prototype.toString() === "[object "+"Object"+"]". Actual: String.prototype.toString() ==='+String.prototype.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/S15.5.4_A2.js b/test/built-ins/String/prototype/S15.5.4_A2.js
new file mode 100644
index 000000000..e3efd8db9
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.4_A2.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String prototype object is itself not a String object
+es5id: 15.5.4_A2
+description: Checking String.prototype
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ (String.prototype !="");
+ $FAIL('#1: "(String.prototype !="");" lead to throwing exception. Actual: '+(String.prototype !=""));
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#1.1: "(String.prototype !="")" lead to throwing exception. Exception is instance of TypeError. Actual: exception is '+e);
+ }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/S15.5.4_A3.js b/test/built-ins/String/prototype/S15.5.4_A3.js
new file mode 100644
index 000000000..433ce049b
--- /dev/null
+++ b/test/built-ins/String/prototype/S15.5.4_A3.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The value of the internal [[Prototype]] property of the String prototype
+ object is the Object prototype object (15.2.3.1)
+es5id: 15.5.4_A3
+description: Checking Object.prototype.isPrototypeOf(String.prototype)
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(Object.prototype.isPrototypeOf(String.prototype))) {
+ $ERROR('#1: Object.prototype.isPrototypeOf(String.prototype) return true. Actual: '+Object.prototype.isPrototypeOf(String.prototype));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+delete String.prototype.toString;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toString() != "[object "+"Object"+"]") {
+ $ERROR('#2: delete String.prototype.toString; String.prototype.toString() == "[object "+"Object"+"]". Actual: String.prototype.toString() =='+String.prototype.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..09a054f67
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1.1.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt() can accept many arguments
+es5id: 15.5.4.4_A1.1
+description: Checking by using eval
+---*/
+
+function __FACTORY(){this.toString = function(){ return "wizard";};};
+
+__FACTORY.prototype.charAt = String.prototype.charAt;
+
+__instance = new __FACTORY;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__instance){
+ 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
new file mode 100644
index 000000000..07076ac75
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.charAt.length property has the attribute ReadOnly
+es5id: 15.5.4.4_A10
+description: >
+ Checking if varying the String.prototype.charAt.length property
+ fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(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;
+
+String.prototype.charAt.length = 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 );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..bb5b5cb34
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the charAt method is 1
+es5id: 15.5.4.4_A11
+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"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.charAt.length !== 1) {
+ $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
new file mode 100644
index 000000000..d88cec69a
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T1
+description: pos is false and true, and instance is object
+---*/
+
+var __instance = new Object(42);
+
+__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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..271c22c06
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T10.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T10
+description: Call charAt() function with object argument
+---*/
+
+var __obj = {toString:function(){return 1;}}
+var __str = "lego";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (charAt(__obj) !== "e") {
+ $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; charAt(__obj) === "e". Actual: charAt(__obj) ==='+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
new file mode 100644
index 000000000..42ad5f81b
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T2
+description: pos is equation with false and true, and instance is Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..6296bb163
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T4.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T4
+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()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..f3d40ae7a
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T5
+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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..73d3ab390
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T6
+description: >
+ Call charAt() function with x argument of new String object, where
+ x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var 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
new file mode 100644
index 000000000..067418236
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T7.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T7
+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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..ef0d83882
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T8.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T8
+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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..6137d3e04
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A1_T9.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt(pos)
+es5id: 15.5.4.4_A1_T9
+description: >
+ Call charAt() function with function(){}() argument of string
+ object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//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(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..f296af88b
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A2.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ When String.prototype.charAt(pos) calls if ToInteger(pos) less than 0 the
+ empty string returns
+es5id: 15.5.4.4_A2
+description: Call charAt(pos) with negative pos
+---*/
+
+function __FACTORY(){};
+
+__FACTORY.prototype.charAt = String.prototype.charAt;
+
+var __instance = new __FACTORY;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__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
new file mode 100644
index 000000000..82327ca30
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ When String.prototype.charAt(pos) calls if ToInteger(pos) not less than
+ ToString(this value) the empty string returns
+es5id: 15.5.4.4_A3
+description: pos is bigger of string length
+---*/
+
+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) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..0a1a61a43
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T1.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ If pos is a value of Number type that is an integer, then the result of
+ x.charAt(pos) is equal to the result of x.substring(pos, pos+1)
+es5id: 15.5.4.4_A4_T1
+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)) );
+ }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..acbff03b2
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T2.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ If pos is a value of Number type that is an integer, then the result of
+ x.charAt(pos) is equal to the result of x.substring(pos, pos+1)
+es5id: 15.5.4.4_A4_T2
+description: >
+ Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb
+ pos is smaller of zero
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//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)) );
+ }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..fab5319f9
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A4_T3.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ If pos is a value of Number type that is an integer, then the result of
+ x.charAt(pos) is equal to the result of x.substring(pos, pos+1)
+es5id: 15.5.4.4_A4_T3
+description: >
+ Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb
+ pos is bigger string length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//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)));
+ }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..aa1e114b8
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A5.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ When String.prototype.charAt(pos) calls first calls ToString, giving it
+ the this value as its argument
+es5id: 15.5.4.4_A5
+description: Change toString function, it trow exception, and call charAt()
+includes: [$FAIL.js]
+---*/
+
+var __obj={
+ valueOf:1,
+ toString:function(){throw 'intostring'},
+ charAt:String.prototype.charAt
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.charAt();
+ $FAIL('#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 );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..1e3114e6a
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt has not prototype property
+es5id: 15.5.4.4_A6
+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 );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..f7d4f52af
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charAt can't be used as constructor
+es5id: 15.5.4.4_A7
+description: Checking if creating the String.prototype.charAt object fails
+includes: [$FAIL.js]
+---*/
+
+var __FACTORY = String.prototype.charAt;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#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));
+ }
+}
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
new file mode 100644
index 000000000..1b2b5e72b
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A8.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.charAt.length property has the attribute DontEnum
+es5id: 15.5.4.4_A8
+description: >
+ Checking if enumerating the String.prototype.charAt.length
+ property fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.charAt.hasOwnProperty('length'))) {
+ $ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+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'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (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 );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..20ddd5f0c
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A9.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.charAt.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.4_A9
+description: >
+ Checking if deleting the String.prototype.charAt.length property
+ fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.charAt.hasOwnProperty('length'))) {
+ $ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.charAt.length) {
+ $ERROR('#1: delete String.prototype.charAt.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//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'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charAt/S9.4_A1.js b/test/built-ins/String/prototype/charAt/S9.4_A1.js
new file mode 100644
index 000000000..eca4d2b87
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S9.4_A1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: If ToNumber(value) is NaN, ToInteger(value) returns +0
+es5id: 9.4_A1
+description: >
+ Check what position is defined by Number.NaN in string "abc":
+ "abc".charAt(Number.NaN)
+---*/
+
+// CHECK#1
+if ("abc".charAt(Number.NaN) !== "a") {
+ $ERROR('#1: "abc".charAt(Number.NaN) === "a". Actual: ' + ("abc".charAt(Number.NaN)));
+}
+
+// CHECK#2
+if ("abc".charAt("x") !== "a") {
+ $ERROR('#2: "abc".charAt("x") === "a". Actual: ' + ("abc".charAt("x")));
+}
diff --git a/test/built-ins/String/prototype/charAt/S9.4_A2.js b/test/built-ins/String/prototype/charAt/S9.4_A2.js
new file mode 100644
index 000000000..8d6aa662e
--- /dev/null
+++ b/test/built-ins/String/prototype/charAt/S9.4_A2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ If ToNumber(value) is +0, -0, +Infinity, or -Infinity,
+ return ToNumber(value)
+es5id: 9.4_A2
+description: >
+ Check what position is defined by Number.NaN in string "abc":
+ "abc".charAt(Number.NaN)
+---*/
+
+// CHECK#1
+if ("abc".charAt(0.0) !== "a") {
+ $ERROR('#1: "abc".charAt(0.0) === "a". Actual: ' + ("abc".charAt(0.0)));
+}
+
+// CHECK#2
+if ("abc".charAt(-0.0) !== "a") {
+ $ERROR('#2: "abc".charAt(-0.0) === "a". Actual: ' + ("abc".charAt(-0.0)));
+}
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js
new file mode 100644
index 000000000..df073dc69
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1.1.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt() can accept many arguments
+es5id: 15.5.4.5_A1.1
+description: Checking by using eval
+---*/
+
+function __FACTORY(){this.toString = function(){ return "wizard";};};
+
+__FACTORY.prototype.charCodeAt = String.prototype.charCodeAt;
+
+var __instance = new __FACTORY;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__instance){
+
+ if (__instance.charCodeAt(eval("1"),true,null,{})!== 0x69) {
+ $ERROR('#1: __instance.charCodeAt(eval("1"),true,null,{})=== 0x69. Actual: __instance.charCodeAt(eval("1"),true,null,{})==='+__instance.charCodeAt(eval("1"),true,null,{}));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js
new file mode 100644
index 000000000..81dbbc563
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.charCodeAt.length property has the attribute ReadOnly
+es5id: 15.5.4.5_A10
+description: >
+ Checking if varying the String.prototype.charCodeAt.length
+ property fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {
+ $ERROR('#1: String.prototype.charCodeAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.charCodeAt.length;
+
+String.prototype.charCodeAt.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.charCodeAt.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.charCodeAt.length; String.prototype.charCodeAt.length = function(){return "shifted";}; String.prototype.charCodeAt.length === __obj. Actual: '+String.prototype.charCodeAt.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A11.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A11.js
new file mode 100644
index 000000000..1137dff67
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the charCodeAt method is 1
+es5id: 15.5.4.5_A11
+description: Checking String.prototype.charCodeAt.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.charCodeAt.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.charCodeAt.hasOwnProperty("length") return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.charCodeAt.length !== 1) {
+ $ERROR('#2: String.prototype.charCodeAt.length === 1. Actual: '+String.prototype.charCodeAt.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T1.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T1.js
new file mode 100644
index 000000000..5cd5570ea
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T1
+description: pos is false and true, and instance is object
+---*/
+
+var __instance = new Object(42);
+
+__instance.charCodeAt = String.prototype.charCodeAt;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((__instance.charCodeAt(false) !== 52)||(__instance.charCodeAt(true) !== 50)) {
+ $ERROR('#1: __instance = new Object(42); __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(false) === 52 and __instance.charCodeAt(true) === 50. Actual: __instance.charCodeAt(false) ==='+__instance.charCodeAt(false)+' and __instance.charCodeAt(true) ==='+__instance.charCodeAt(true) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js
new file mode 100644
index 000000000..9c2164628
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T10.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T10
+description: Call charCodeAt() function with object argument
+---*/
+
+var __obj = {toString:function(){return 1;}}
+var __str = "lego";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (charCodeAt(__obj) !== 0x65) {
+ $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; charCodeAt(__obj) === 0x65. Actual: charCodeAt(__obj) ==='+charCodeAt(__obj) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T2.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T2.js
new file mode 100644
index 000000000..547304029
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T2.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T2
+description: pos is equation with false and true, and instance is Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.charCodeAt = String.prototype.charCodeAt;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.charCodeAt(false)!==0x66) {
+ $ERROR('#1: __instance = new Boolean; __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(false)===0x66. Actual: '+__instance.charCodeAt(false));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__instance.charCodeAt(true)!==0x61) {
+ $ERROR('#2: __instance = new Boolean; __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(true)===0x61. Actual: '+__instance.charCodeAt(true));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__instance.charCodeAt(true+1) !== 0x6C) {
+ $ERROR('#3: __instance = new Boolean; __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(true+1) === 0x6C. Actual: '+__instance.charCodeAt(true+1) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T4.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T4.js
new file mode 100644
index 000000000..8b0b253dc
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T4.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T4
+description: Call charCodeAt() function without argument of string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since Number() evaluates to 0 charCodeAt() evaluates to charCodeAt(0)
+if ("smart".charCodeAt() !== 0x73) {
+ $ERROR('#1: "smart".charCodeAt() === 0x73. Actual: "smart".charCodeAt() ==='+("smart".charCodeAt()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T5.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T5.js
new file mode 100644
index 000000000..a80b2b0ca
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T5
+description: Call charCodeAt() function with null argument of function object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToInteger(null) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)
+if (function(){return "lego"}().charCodeAt(null) !== 0x6C) {
+ $ERROR('#1: function(){return "lego"}().charCodeAt(null) === 0x6C. Actual: '+function(){return "lego"}().charCodeAt(null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T6.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T6.js
new file mode 100644
index 000000000..3ddf8b0e7
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T6
+description: >
+ Call charCodeAt() function with x argument of new String object,
+ where x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToInteger(undefined) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)
+if (new String("lego").charCodeAt(x) !== 0x6C) {
+ $ERROR('#1: var x; new String("lego").charCodeAt(x) === 0x6C. Actual: new String("lego").charCodeAt(x) ==='+new String("lego").charCodeAt(x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T7.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T7.js
new file mode 100644
index 000000000..a59910356
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T7.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T7
+description: Call charCodeAt() function with undefined argument of string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToInteger(undefined) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)
+if (String("lego").charCodeAt(undefined) !== 0x6C) {
+ $ERROR('#1: String("lego").charCodeAt(undefined) === 0x6C. Actual: String("lego").charCodeAt(undefined) ==='+String("lego").charCodeAt(undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T8.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T8.js
new file mode 100644
index 000000000..8a6b06344
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T8.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T8
+description: Call charCodeAt() function with void 0 argument of string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToInteger(void 0) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)
+if (String(42).charCodeAt(void 0) !== 0x34) {
+ $ERROR('#1: String(42).charCodeAt(void 0) === 0x34. Actual: String(42).charCodeAt(void 0) ==='+String(42).charCodeAt(void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T9.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T9.js
new file mode 100644
index 000000000..9a336549c
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A1_T9.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt(pos)
+es5id: 15.5.4.5_A1_T9
+description: >
+ Call charCodeAt() function with function(){}() argument of string
+ object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToInteger(undefined) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)
+if (new String(42).charCodeAt(function(){}()) !== 0x34) {
+ $ERROR('#1: new String(42).charCodeAt(function(){}()) === 0x34. Actual: new String(42).charCodeAt(function(){}()) ==='+new String(42).charCodeAt(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A2.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A2.js
new file mode 100644
index 000000000..d34f9c58f
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A2.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ When String.prototype.charCodeAt(pos) calls if ToInteger(pos) less than 0
+ the NaN returns
+es5id: 15.5.4.5_A2
+description: Call charCodeAt(pos) with negative pos
+---*/
+
+function __FACTORY(){};
+
+__FACTORY.prototype.charCodeAt = String.prototype.charCodeAt;
+
+var __instance = new __FACTORY;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!isNaN(__instance.charCodeAt(-1))) {
+ $ERROR('#1: function __FACTORY(){}; __FACTORY.prototype.charCodeAt = String.prototype.charCodeAt; __instance = new __FACTORY; isNaN(__instance.charCodeAt(-1)) return true. Actual: '+isNaN(__instance.charCodeAt(-1)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A3.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A3.js
new file mode 100644
index 000000000..911fffa11
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ When String.prototype.charCodeAt(pos) calls if ToInteger(pos) not less
+ than ToString(this value) the NaN returns
+es5id: 15.5.4.5_A3
+description: pos is bigger of string length
+---*/
+
+var __instance = new String("ABC");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!isNaN(__instance.charCodeAt(3))) {
+ $ERROR('#1: __instance = new String("ABC"); isNaN(__instance.charCodeAt(3)) return true. Actual: '+isNaN(__instance.charCodeAt(3)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A4.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A4.js
new file mode 100644
index 000000000..33a2360a1
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A4.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ When String.prototype.charCodeAt(pos) calls first calls ToString, giving
+ it the this value as its argument
+es5id: 15.5.4.5_A4
+description: Change toString function, it trow exception, and call charCodeAt()
+includes: [$FAIL.js]
+---*/
+
+var __obj={
+ valueOf:1,
+ toString:function(){throw 'intostring'},
+ charCodeAt:String.prototype.charCodeAt
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.charCodeAt();
+ $FAIL('#1: "var x = __obj.charCodeAt()" lead to throwing exception');
+} catch (e) {
+ if (e !== 'intostring') {
+ $ERROR('#1.1: Exception === \'intostring\'. Actual: exception ==='+e );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A6.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A6.js
new file mode 100644
index 000000000..4098f04d2
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt has not prototype property
+es5id: 15.5.4.5_A6
+description: Checking String.prototype.charCodeAt.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.charCodeAt.prototype !== undefined) {
+ $ERROR('#1: String.prototype.charCodeAt.prototype === undefined. Actual: '+String.prototype.charCodeAt.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A7.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A7.js
new file mode 100644
index 000000000..c93d26f94
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.charCodeAt can't be used as constructor
+es5id: 15.5.4.5_A7
+description: Checking if creating the String.prototype.charCodeAt object fails
+includes:
+ - $FAIL.js
+ - Test262Error.js
+---*/
+
+var __FACTORY = String.prototype.charCodeAt;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.charCodeAt; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js
new file mode 100644
index 000000000..bfc9dcf4d
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.charCodeAt.length property has the attribute DontEnum
+es5id: 15.5.4.5_A8
+description: >
+ Checking if enumerating the String.prototype.charCodeAt.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.charCodeAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.charCodeAt.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.charCodeAt.propertyIsEnumerable(\'length\') return false. Actual: '+String.prototype.charCodeAt.propertyIsEnumerable('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.charCodeAt){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.charCodeAt){if (p==="length") count++;} count === 0. Actual: count ==='+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A9.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A9.js
new file mode 100644
index 000000000..104e94654
--- /dev/null
+++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.charCodeAt.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.5_A9
+description: >
+ Checking if deleting the String.prototype.charCodeAt.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.charCodeAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.charCodeAt.length) {
+ $ERROR('#1: delete String.prototype.charCodeAt.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.charCodeAt.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.charCodeAt.length; String.prototype.charCodeAt.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js
new file mode 100644
index 000000000..7aac0eb1c
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.concat.length property has the attribute ReadOnly
+es5id: 15.5.4.6_A10
+description: >
+ Checking if varying the String.prototype.concat.length property
+ fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.concat.hasOwnProperty('length'))) {
+ $ERROR('#1: String.prototype.concat.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.concat.length;
+
+String.prototype.concat.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.concat.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.concat.length; String.prototype.concat.length = function(){return "shifted";}; String.prototype.concat.length === __obj. Actual: '+String.prototype.concat.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A11.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A11.js
new file mode 100644
index 000000000..69016d99a
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the concat method is 1
+es5id: 15.5.4.6_A11
+description: Checking String.prototype.concat.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.concat.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.concat.hasOwnProperty("length") return true. Actual: '+String.prototype.concat.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.concat.length !== 1) {
+ $ERROR('#2: String.prototype.concat.length === 1. Actual: '+String.prototype.concat.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T1.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T1.js
new file mode 100644
index 000000000..647cb30b5
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T1
+description: Arguments are false and true, and instance is object
+---*/
+
+var __instance = new Object(42);
+
+__instance.concat = String.prototype.concat;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.concat(false,true) !== "42falsetrue") {
+ $ERROR('#1: __instance = new Object(42); __instance.concat = String.prototype.concat; __instance.concat(false,true) === "42falsetrue". Actual: '+__instance.concat(false,true) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js
new file mode 100644
index 000000000..5f212d16d
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T10.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T10
+description: Call concat([,[...]]) function with object arguments
+---*/
+
+var __obj = {toString:function(){return "\u0041";}}
+var __obj2 = {toString:function(){return true;}}
+var __obj3 = {toString:function(){return 42;}}
+var __str = "lego";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (concat(__obj, __obj2, __obj3, x) !== "legoAtrue42undefined") {
+ $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041";}}; var __obj2 = {toString:function(){return true;}}; var __obj3 = {toString:function(){return 42;}}; var __str = "lego"; concat(__obj, __obj2, __obj3, x) === "legoAtrue42undefined". Actual: '+concat(__obj, __obj2, __obj3, x) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T2.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T2.js
new file mode 100644
index 000000000..974b29823
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T2
+description: >
+ Arguments are equation with false and true, and instance is
+ Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.concat = String.prototype.concat;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.concat("\u0041",true,true+1) !== "falseAtrue2") {
+ $ERROR('#1: __instance = new Boolean; __instance.concat = String.prototype.concat; __instance.concat("\\u0041",true,true+1) === "falseAtrue2". Actual: '+__instance.concat("\u0041",true,true+1) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T4.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T4.js
new file mode 100644
index 000000000..f243a077d
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T4.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T4
+description: Call concat([,[...]]) function without argument of string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString() evaluates to "" concat() evaluates to concat("")
+if ("lego".concat() !== "lego") {
+ $ERROR('#1: "lego".concat() === "lego". Actual: '+("lego".concat()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T5.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T5.js
new file mode 100644
index 000000000..7bad9d2e0
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T5.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T5
+description: >
+ Call concat([,[...]]) function with null argument of function
+ object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" concat(null) evaluates to concat("null")
+if (function(){return "lego"}().concat(null) !== "legonull") {
+ $ERROR('#1: function(){return "lego"}().concat(null) === "legonull". Actual: '+function(){return "lego"}().concat(null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T6.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T6.js
new file mode 100644
index 000000000..e633a6afa
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T6
+description: >
+ Call concat([,[...]]) function with x argument of new String
+ object, where x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" concat(undefined) evaluates to concat("undefined")
+if (new String("lego").concat(x) !== "legoundefined") {
+ $ERROR('#1: var x; new String("lego").concat(x) === "legoundefined". Actual: '+new String("lego").concat(x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T7.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T7.js
new file mode 100644
index 000000000..10e915663
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T7.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T7
+description: >
+ Call concat([,[...]]) function with undefined argument of string
+ object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" concat(undefined) evaluates to concat("undefined")
+if (String("lego").concat(undefined) !== "legoundefined") {
+ $ERROR('#1: String("lego").concat(undefined) === "legoundefined". Actual: '+String("lego").concat(undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T8.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T8.js
new file mode 100644
index 000000000..4ededc053
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T8.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T8
+description: >
+ Call concat([,[...]]) function with void 0 argument of string
+ object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(void 0) evaluates to "undefined" concat(void 0) evaluates to concat("undefined")
+if (String(42).concat(void 0) !== "42undefined") {
+ $ERROR('#1: String(42).concat(void 0) === "42undefined". Actual: '+String(42).concat(void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T9.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T9.js
new file mode 100644
index 000000000..08d70fd86
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A1_T9.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]])
+es5id: 15.5.4.6_A1_T9
+description: >
+ Call concat([,[...]]) function with function(){}() argument of
+ string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" concat(undefined) evaluates to concat("undefined")
+if (new String(42).concat(function(){}()) !== "42undefined") {
+ $ERROR('#1: new String(42).concat(function(){}()) === "42undefined". Actual: '+new String(42).concat(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A2.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A2.js
new file mode 100644
index 000000000..b16030c88
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A2.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]]) can accept at least 128
+es5id: 15.5.4.6_A2
+description: Call concat([,[...]]) function with 128 arguments
+---*/
+
+var __instance = new Number();
+
+__instance.concat = String.prototype.concat;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.concat(
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,
+0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF
+) !== "001234567891011121314150123456789101112131415012345678910111213141501234567891011121314150123456789101112131415012345678910111213141501234567891011121314150123456789101112131415") {
+ $ERROR('#1: Call concat([,[...]]) function with 128 arguments does not lead to throwing any errors');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A3.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A3.js
new file mode 100644
index 000000000..3b2301578
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat([,[...]]) can't change the instance to be applied
+es5id: 15.5.4.6_A3
+description: Checking if varying the instance that is applied fails
+---*/
+
+var __instance = new String("one");
+
+__instance.concat("two");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance != "one") {
+ $ERROR('#1: __instance = new String("one"); __instance.concat("two"); __instance = new String("one"); __instance.concat("two"); __instance == "one". Actual: '+__instance);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A4_T1.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A4_T1.js
new file mode 100644
index 000000000..7ee2e303f
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A4_T1.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.concat([,[...]]) is called first Call ToString,
+ giving it the this value as its argument
+es5id: 15.5.4.6_A4_T1
+description: Override toString function
+---*/
+
+var __instance = {toString:function(){return "one"}};
+
+__instance.concat = String.prototype.concat;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.concat("two",x) !== "onetwoundefined") {
+ $ERROR('#1: var x; __instance = {toString:function(){return "one"}}; __instance.concat = String.prototype.concat; __instance.concat("two",x) === "onetwoundefined". Actual: '+__instance.concat("two",x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A4_T2.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A4_T2.js
new file mode 100644
index 000000000..0b6a1fde7
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A4_T2.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.concat([,[...]]) is called first Call ToString,
+ giving it the this value as its argument
+es5id: 15.5.4.6_A4_T2
+description: Override toString function onto function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __instance = {toString:function(){throw "intostring";}};
+var __obj = {toString:function(){throw "infirstarg";}};
+
+__instance.concat = String.prototype.concat;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ String.prototype.concat.call(__instance,__obj, notexist);
+ $FAIL('#1: "String.prototype.concat.call(__instance,__obj, notexist)" lead to throwing exception');
+} catch (e) {
+ if (e !== "intostring") {
+ $ERROR('#1: e === "intostring". Actual: '+e );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var notexist;
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A6.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A6.js
new file mode 100644
index 000000000..4da0d1454
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat has not prototype property
+es5id: 15.5.4.6_A6
+description: Checking String.prototype.concat.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.concat.prototype !== undefined) {
+ $ERROR('#1: String.prototype.concat.prototype === undefined. Actual: '+String.prototype.concat.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A7.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A7.js
new file mode 100644
index 000000000..c90bf5b82
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.concat can't be used as constructor
+es5id: 15.5.4.6_A7
+description: Checking if creating the String.prototype.concat object fails
+includes:
+ - $FAIL.js
+ - Test262Error.js
+---*/
+
+var __FACTORY = String.prototype.concat;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.concat; "__instance = new __FACTORY" lead throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js
new file mode 100644
index 000000000..045567dc5
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.concat.length property has the attribute DontEnum
+es5id: 15.5.4.6_A8
+description: >
+ Checking if enumerating the String.prototype.concat.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.concat.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.concat.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.concat.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.concat.propertyIsEnumerable(\'length\') return false. Actual: '+String.prototype.concat.propertyIsEnumerable('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+count = 0;
+
+for (p in String.prototype.concat){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count = 0; for (p in String.prototype.concat){ if (p==="length") count++;}; count === 0. Actual: '+count);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A9.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A9.js
new file mode 100644
index 000000000..f381eccf7
--- /dev/null
+++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.concat.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.6_A9
+description: >
+ Checking if deleting the String.prototype.concat.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.concat.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.concat.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.concat.length) {
+ $ERROR('#1: delete String.prototype.concat.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.concat.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.concat.length; String.prototype.concat.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.concat.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T1.js b/test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T1.js
new file mode 100644
index 000000000..811d05a42
--- /dev/null
+++ b/test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The initial value of String.prototype.constructor is the built-in String
+ constructor
+es5id: 15.5.4.1_A1_T1
+description: Checking String.prototype.constructor
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.constructor !== String) {
+ $ERROR('#1: String.prototype.constructor === String. Actual: String.prototype.constructor ==='+String.prototype.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T2.js b/test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T2.js
new file mode 100644
index 000000000..62709d537
--- /dev/null
+++ b/test/built-ins/String/prototype/constructor/S15.5.4.1_A1_T2.js
@@ -0,0 +1,50 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The initial value of String.prototype.constructor is the built-in String
+ constructor
+es5id: 15.5.4.1_A1_T2
+description: Create new String.prototype.constructor object and check it
+---*/
+
+var __constr = String.prototype.constructor;
+
+var __instance = new __constr("choosing one");
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#0
+if (__instance !="choosing one") {
+ $ERROR('#0: __constr = String.prototype.constructor; __instance = new __constr("choosing one"); __instance =="choosing one". Actual: __instance =='+__instance );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (__instance.constructor !== String) {
+ $ERROR('#1: __constr = String.prototype.constructor; __instance = new __constr("choosing one"); __instance.constructor === String. Actual: __instance.constructor ==='+__instance.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+if (!(String.prototype.isPrototypeOf(__instance))) {
+ $ERROR('#2: __constr = String.prototype.constructor; __instance = new __constr("choosing one"); String.prototype.isPrototypeOf(__instance) return true. Actual: '+String.prototype.isPrototypeOf(__instance));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#3
+var __to_string_result = '[object '+ 'String' +']';
+
+delete String.prototype.toString;
+
+if (__instance.toString() !== __to_string_result) {
+ $ERROR('#3: __constr = String.prototype.constructor; __instance = new __constr("choosing one"); delete String.prototype.toString; __instance.toString() === __to_string_result. Actual: __instance.toString() ==='+__instance.toString()+' __to_string_result ==='+__to_string_result );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/contains/String.prototype.contains_FailBadLocation.js b/test/built-ins/String/prototype/contains/String.prototype.contains_FailBadLocation.js
new file mode 100644
index 000000000..88495ab41
--- /dev/null
+++ b/test/built-ins/String/prototype/contains/String.prototype.contains_FailBadLocation.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ String should return false if a location is passed that is
+ greather than the length of the string.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.contains('w', 5) === false) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/contains/String.prototype.contains_FailLocation.js b/test/built-ins/String/prototype/contains/String.prototype.contains_FailLocation.js
new file mode 100644
index 000000000..f7e892bae
--- /dev/null
+++ b/test/built-ins/String/prototype/contains/String.prototype.contains_FailLocation.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ String should return false if a letter is not found in the word
+ starting from the passed location.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.contains('o', 3) === false) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/contains/String.prototype.contains_FailMissingLetter.js b/test/built-ins/String/prototype/contains/String.prototype.contains_FailMissingLetter.js
new file mode 100644
index 000000000..f15a5c173
--- /dev/null
+++ b/test/built-ins/String/prototype/contains/String.prototype.contains_FailMissingLetter.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: String should return false if a letter is not found in the word.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.contains('a', 0) === false) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/contains/String.prototype.contains_Success.js b/test/built-ins/String/prototype/contains/String.prototype.contains_Success.js
new file mode 100644
index 000000000..bce79a1ff
--- /dev/null
+++ b/test/built-ins/String/prototype/contains/String.prototype.contains_Success.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ String should return true when called on 'word' and passed 'w' and
+ the location 0.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.contains('w', 0) === true) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/contains/String.prototype.contains_SuccessNoLocation.js b/test/built-ins/String/prototype/contains/String.prototype.contains_SuccessNoLocation.js
new file mode 100644
index 000000000..e807b3211
--- /dev/null
+++ b/test/built-ins/String/prototype/contains/String.prototype.contains_SuccessNoLocation.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ String should return true when called on 'word' and passed 'w' and
+ with no location (defaults to 0).
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.contains('w') === true) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/contains/String.prototype.contains_lengthProp.js b/test/built-ins/String/prototype/contains/String.prototype.contains_lengthProp.js
new file mode 100644
index 000000000..7103e65c1
--- /dev/null
+++ b/test/built-ins/String/prototype/contains/String.prototype.contains_lengthProp.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: String should have the property length with size of 1.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.contains.length === 1) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail.js b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail.js
new file mode 100644
index 000000000..e6502fcd3
--- /dev/null
+++ b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: endsWith should return false when called on 'word' and passed 'r'.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.endsWith('r') === false) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail_2.js b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail_2.js
new file mode 100644
index 000000000..0bf489892
--- /dev/null
+++ b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Fail_2.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ endsWith should return false when called on 'word' and passed 'd',
+ with an endPosition of 3.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.endsWith('d', 3) === false) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success.js b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success.js
new file mode 100644
index 000000000..02e1e6e97
--- /dev/null
+++ b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ endsWith should return true when called on 'word' and passed 'd'
+ and with no endPosition (defaults to 4).
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.endsWith('d') === true) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_2.js b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_2.js
new file mode 100644
index 000000000..61584dbe1
--- /dev/null
+++ b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_2.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ endsWith should return true when called on 'word' and passed 'd'
+ and with an endPosition of 4.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.endsWith('d', 4) === true) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_3.js b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_3.js
new file mode 100644
index 000000000..c683c8a99
--- /dev/null
+++ b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_3.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ endsWith should return true when called on 'word' and passed 'd'
+ and with an endPosition of 25.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.endsWith('d', 25) === true) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_4.js b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_4.js
new file mode 100644
index 000000000..116ddc8eb
--- /dev/null
+++ b/test/built-ins/String/prototype/endsWith/String.prototype.endsWith_Success_4.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*---
+author: Ryan Lewis
+description: >
+ endsWith should return true when called on 'word' and passed 'r',
+ with an endPosition of 3.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if('word'.endsWith('r', 3) === true) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js
new file mode 100644
index 000000000..8a6113717
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.indexOf.length property has the attribute ReadOnly
+es5id: 15.5.4.7_A10
+description: >
+ Checking if varying the String.prototype.indexOf.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.indexOf.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.indexOf.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.indexOf.length;
+
+String.prototype.indexOf.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.indexOf.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.indexOf.length; String.prototype.indexOf.length = function(){return "shifted";}; String.prototype.indexOf.length === __obj. Actual: '+String.prototype.indexOf.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A11.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A11.js
new file mode 100644
index 000000000..db610fbe1
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the indexOf method is 1
+es5id: 15.5.4.7_A11
+description: Checking String.prototype.indexOf.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.indexOf.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.indexOf.hasOwnProperty("length") return true. Actual: '+String.prototype.indexOf.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.indexOf.length !== 1) {
+ $ERROR('#2: String.prototype.indexOf.length === 1. Actual: '+String.prototype.indexOf.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T1.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T1.js
new file mode 100644
index 000000000..f3bc0fb9b
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T1
+description: Arguments are false and true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.indexOf = String.prototype.indexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.indexOf(true, false) !== 0) {
+ $ERROR('#1: __instance = new Object(true); __instance.indexOf = String.prototype.indexOf; __instance.indexOf(true, false) === 0. Actual: '+__instance.indexOf(true, false) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js
new file mode 100644
index 000000000..1b102a029
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T10.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T10
+description: Call indexOf(searchString, position) function with object arguments
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return true;}}
+var __str = "ABB\u0041BABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (indexOf(__obj, __obj2) !== 3) {
+ $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABB\u0041BABAB"; indexOf(__obj, __obj2) === 3. Actual: '+indexOf(__obj, __obj2) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T11.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T11.js
new file mode 100644
index 000000000..017e5b240
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T11.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T11
+description: Instance is Date(0) object
+---*/
+
+var __instance = new Date(0);
+
+__instance.indexOf = String.prototype.indexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((__instance.getTimezoneOffset()>0 ? __instance.indexOf('31') : __instance.indexOf('01')) !== 8) {
+ $ERROR('#1: __instance = new Date(0); __instance.indexOf = String.prototype.indexOf; (__instance.getTimezoneOffset()>0 ? __instance.indexOf(\'31\') : __instance.indexOf(\'01\')) === 8. Actual: '+(__instance.getTimezoneOffset()>0 ? __instance.indexOf('31') : __instance.indexOf('01')) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T12.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T12.js
new file mode 100644
index 000000000..b641ced38
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T12.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T12
+description: Argument is string, and instance is array of strings
+---*/
+
+var __instance = new Array('new','zoo','revue');
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.indexOf('new') !== 0) {
+ $ERROR('#1: __instance = new Array(\'new\',\'zoo\',\'revue\'); __instance.indexOf(\'new\') === 0. Actual: '+__instance.indexOf('new') );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__instance.indexOf('zoo') !== 1) {
+ $ERROR('#2: __instance = new Array(\'new\',\'zoo\',\'revue\'); __instance.indexOf(\'zoo\') === 1. Actual: '+__instance.indexOf('zoo') );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T2.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T2.js
new file mode 100644
index 000000000..c20692bb2
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T2
+description: >
+ Arguments are boolean equation, function and null, and instance is
+ Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.indexOf = String.prototype.indexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.indexOf("A"!=="\u0041", function(){return 0;}(),null) !== 0) {
+ $ERROR('#1: __instance = new Boolean; __instance.indexOf = String.prototype.indexOf; __instance.indexOf("A"!=="\\u0041", function(){return 0;}(),null) === 0. Actual: '+__instance.indexOf("A"!=="\u0041", function(){return 0;}(),null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T4.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T4.js
new file mode 100644
index 000000000..d9f26b932
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T4.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T4
+description: >
+ Call indexOf(searchString, position) function without arguments of
+ string
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString() evaluates to "" indexOf() evaluates to indexOf("",0)
+if ("".indexOf() !== -1) {
+ $ERROR('#1: "".indexOf() === -1. Actual: '+("".indexOf()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T5.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T5.js
new file mode 100644
index 000000000..61d8e7037
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T5.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T5
+description: >
+ Call indexOf(searchString, position) function with null argument
+ of function object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" indexOf(null) evaluates to indexOf("",0)
+if (function(){return "gnulluna"}().indexOf(null) !== 1) {
+ $ERROR('#1: function(){return "gnulluna"}().indexOf(null) === 1. Actual: '+function(){return "gnulluna"}().indexOf(null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T6.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T6.js
new file mode 100644
index 000000000..4279d8f7e
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T6
+description: >
+ Call indexOf(searchString, position) function with x argument of
+ new String object, where x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "" indexOf(undefined) evaluates to indexOf("",0)
+if (new String("undefined").indexOf(x) !== 0) {
+ $ERROR('#1: var x; new String("undefined").indexOf(x) === 0. Actual: '+new String("undefined").indexOf(x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T7.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T7.js
new file mode 100644
index 000000000..485239896
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T7.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T7
+description: >
+ Call indexOf(searchString, position) function with undefined
+ argument of string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" indexOf(undefined) evaluates to indexOf("undefined",0)
+if (String("undefined").indexOf(undefined) !== 0) {
+ $ERROR('#1: String("undefined").indexOf(undefined) === 0. Actual: '+String("undefined").indexOf(undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T8.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T8.js
new file mode 100644
index 000000000..1232528e7
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T8.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T8
+description: >
+ Call indexOf(searchString, position) function with void 0 argument
+ of string object
+---*/
+
+var __obj = {toString:function(){}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(void 0) evaluates to "undefined" indexOf(void 0) evaluates to indexOf("undefined")
+if (String(__obj).indexOf(void 0) !== 0) {
+ $ERROR('#1: __obj = {toString:function(){}}; String(__obj).indexOf(void 0) === 0. Actual: '+String(__obj).indexOf(void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T9.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T9.js
new file mode 100644
index 000000000..69dd4c039
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A1_T9.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf(searchString, position)
+es5id: 15.5.4.7_A1_T9
+description: >
+ Call indexOf(searchString, position) function with function(){}()
+ argument of string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" indexOf(undefined) evaluates to indexOf("undefined")
+if (new String(__obj).indexOf(function(){}()) !== 0) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).indexOf(function(){}()) === 0. Actual: '+new String(__obj).indexOf(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T1.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T1.js
new file mode 100644
index 000000000..a2e046ce2
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When length of searchString less than length of ToString(this) -1 returns
+es5id: 15.5.4.7_A2_T1
+description: Call "abcd".indexOf("abcdab") and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("abcd".indexOf("abcdab")!==-1) {
+ $ERROR('#1: "abcd".indexOf("abcdab")===-1. Actual: '+("abcd".indexOf("abcdab")));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T2.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T2.js
new file mode 100644
index 000000000..f342413d7
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T2.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When length of searchString less than length of ToString(this) -1 returns
+es5id: 15.5.4.7_A2_T2
+description: Call "abcd".indexOf("abcdab",0) and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("abcd".indexOf("abcdab",0)!==-1) {
+ $ERROR('#1: "abcd".indexOf("abcdab",0)===-1. Actual: '+("abcd".indexOf("abcdab",0)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T3.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T3.js
new file mode 100644
index 000000000..f7e1100b8
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T3.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When length of searchString less than length of ToString(this) -1 returns
+es5id: 15.5.4.7_A2_T3
+description: Call "abcd".indexOf("abcdab",99) and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("abcd".indexOf("abcdab",99)!==-1) {
+ $ERROR('#1: "abcd".indexOf("abcdab",99)===-1. Actual: '+("abcd".indexOf("abcdab",99)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T4.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T4.js
new file mode 100644
index 000000000..bf82c55e6
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A2_T4.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: When length of searchString less than length of ToString(this) -1 returns
+es5id: 15.5.4.7_A2_T4
+description: Call "abcd".indexOf("abcdab",NaN) and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("abcd".indexOf("abcdab",NaN)!==-1) {
+ $ERROR('#1: "abcd".indexOf("abcdab",NaN)===-1. Actual: '+("abcd".indexOf("abcdab",NaN)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T1.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T1.js
new file mode 100644
index 000000000..559ab3234
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0
+ indexOf(searchString,0) returns
+es5id: 15.5.4.7_A3_T1
+description: Call "$$abcdabcd".indexOf("ab",NaN) and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("$$abcdabcd".indexOf("ab",NaN)!==2) {
+ $ERROR('#1: "$$abcdabcd".indexOf("ab",NaN)===2. Actual: '+("$$abcdabcd".indexOf("ab",NaN)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T2.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T2.js
new file mode 100644
index 000000000..88d3ac1a8
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0
+ indexOf(searchString,0) returns
+es5id: 15.5.4.7_A3_T2
+description: Call "$$abcdabcd".indexOf("ab",eval("\"-99\"")) and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("$$abcdabcd".indexOf("ab",eval("\"-99\""))!==2) {
+ $ERROR('#1: "$$abcdabcd".indexOf("ab",eval("\\"-99\\""))===2. Actual: '+("$$abcdabcd".indexOf("ab",eval("\"-99\""))));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T3.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T3.js
new file mode 100644
index 000000000..de1f32219
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A3_T3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0
+ indexOf(searchString,0) returns
+es5id: 15.5.4.7_A3_T3
+description: >
+ Call "$$abcdabcd".indexOf("ab",function(){return -Infinity;}())
+ and check result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("$$abcdabcd".indexOf("ab", function(){return -Infinity;}())!==2) {
+ $ERROR('#1: "$$abcdabcd".indexOf("ab", function(){return -Infinity;}())===2. Actual: '+("$$abcdabcd".indexOf("ab", function(){return -Infinity;}())));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js
new file mode 100644
index 000000000..8fba0cfc2
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T1.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.7_A4_T1
+description: Override toString and valueOf functions, valueOf throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){throw "intointeger";}}
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = indexOf(__obj, __obj2);
+ $FAIL('#1: "var x = indexOf(__obj, __obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js
new file mode 100644
index 000000000..da8975af2
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T2.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.7_A4_T2
+description: >
+ Override toString and valueOf functions, second toString throw
+ exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}}
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = indexOf(__obj, __obj2);
+ $FAIL('#1: "var x = indexOf(__obj, __obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T3.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T3.js
new file mode 100644
index 000000000..448667473
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T3.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.7_A4_T3
+description: Override toString and valueOf functions
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return {};},toString:function(){return "1";}}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041BABAB".indexOf(__obj, __obj2)!==3) {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "1";}}; "ABB\\u0041BABAB".indexOf(__obj, __obj2)===3. Actual: '+("ABB\u0041BABAB".indexOf(__obj, __obj2)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js
new file mode 100644
index 000000000..d6815ff16
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T4.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.7_A4_T4
+description: Override toString and valueOf functions, and they throw exceptions
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}};
+var __obj2 = {valueOf:function(){throw "intoint";}};
+var __instance = new Number(10001.10001);
+Number.prototype.indexOf=String.prototype.indexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__instance){
+ try {
+ var x = indexOf(__obj, __obj2);
+ $FAIL('#1: "var x = indexOf(__obj, __obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T5.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T5.js
new file mode 100644
index 000000000..edaac9b58
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A4_T5.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.7_A4_T5
+description: >
+ Override toString and valueOf functions, first and second valueOf
+ throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}};
+
+var __obj2 = {valueOf:function(){throw "intointeger";}};
+
+__FACTORY.prototype.indexOf = String.prototype.indexOf;
+
+var __instance = new __FACTORY(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __instance.indexOf(__obj, __obj2);
+ $FAIL('#1: "var x = __instance.indexOf(__obj, __obj2)" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __FACTORY( value ) {
+ this.value = value;
+ this.toString = function() { return new Number; };
+ this.valueOf=function(){return this.value+""};
+}
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T1.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T1.js
new file mode 100644
index 000000000..eef162fed
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf works properly
+es5id: 15.5.4.7_A5_T1
+description: Search one symbol from begin of string
+---*/
+
+var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+for (var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) {
+ if (TEST_STRING.indexOf( String.fromCharCode(i), 0 )!==k) {
+ $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( String.fromCharCode('+i+'), 0 )==='+k+'. Actual: '+TEST_STRING.indexOf( String.fromCharCode(i), 0 ));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T2.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T2.js
new file mode 100644
index 000000000..b6f09b64c
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf works properly
+es5id: 15.5.4.7_A5_T2
+description: Search one symbol from it`s position in the string
+---*/
+
+var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+for (var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) {
+ if (TEST_STRING.indexOf( String.fromCharCode(i), k )!==k) {
+ $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( String.fromCharCode('+i+'), '+k+' )==='+k+'. Actual: '+TEST_STRING.indexOf( String.fromCharCode(i), k ));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T3.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T3.js
new file mode 100644
index 000000000..f13ef4847
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf works properly
+es5id: 15.5.4.7_A5_T3
+description: Search one symbol from it`s position+1 in the string
+---*/
+
+var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+for ( var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) {
+ if (TEST_STRING.indexOf( String.fromCharCode(i), k+1 ) !== -1) {
+ $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( String.fromCharCode('+i+'), '+(k+1)+' )===-1. Actual: '+TEST_STRING.indexOf( String.fromCharCode(i), k+1 ));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T4.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T4.js
new file mode 100644
index 000000000..1d89cb311
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T4.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf works properly
+es5id: 15.5.4.7_A5_T4
+description: Search substring from begin of string
+---*/
+
+var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+for (var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) {
+ if (TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), 0 )!==k) {
+ $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( (String.fromCharCode('+i+')+ String.fromCharCode('+(i+1)+') + String.fromCharCode('+(i+2)+')), 0 )==='+k+'. Actual: '+TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), 0 ));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T5.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T5.js
new file mode 100644
index 000000000..95262eb4e
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T5.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf works properly
+es5id: 15.5.4.7_A5_T5
+description: Search substring from it`s position in the string
+---*/
+
+var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+for ( var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) {
+ if (TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1)+ String.fromCharCode(i+2)),k ) !==k) {
+ $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( (String.fromCharCode('+i+')+ String.fromCharCode('+(i+1)+') + String.fromCharCode('+(i+2)+')), '+k+' )==='+k+'. Actual: '+TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), k ));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T6.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T6.js
new file mode 100644
index 000000000..c8456ed37
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A5_T6.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf works properly
+es5id: 15.5.4.7_A5_T6
+description: Search substring from it`s position+1 in the string
+---*/
+
+var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+for (var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) {
+ if (TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1)+ String.fromCharCode(i+2)), k+1 )!== -1) {
+ $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( (String.fromCharCode('+i+')+ String.fromCharCode('+(i+1)+') + String.fromCharCode('+(i+2)+')), '+(k+1)+' )=== -1. Actual: '+TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), k+1 ));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A6.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A6.js
new file mode 100644
index 000000000..406153de7
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf has not prototype property
+es5id: 15.5.4.7_A6
+description: Checking String.prototype.indexOf.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.indexOf.prototype !== undefined) {
+ $ERROR('#1: String.prototype.indexOf.prototype === undefined. Actual: '+String.prototype.indexOf.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A7.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A7.js
new file mode 100644
index 000000000..c7f8866c5
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A7.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.indexOf can't be used as constructor
+es5id: 15.5.4.7_A7
+description: Checking if creating the String.prototype.indexOf object fails
+includes:
+ - $PRINT.js
+ - $FAIL.js
+---*/
+
+var __FACTORY = String.prototype.indexOf;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: var __FACTORY = String.prototype.indexOf; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.2: var __FACTORY = String.prototype.indexOf; "__instance = new __FACTORY" throw a TypeError. Actual: ' + (e));
+ }
+ $PRINT(e);
+}
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js
new file mode 100644
index 000000000..22e3a52c8
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A8.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.indexOf.length property has the attribute DontEnum
+es5id: 15.5.4.7_A8
+description: >
+ Checking if enumerating the String.prototype.indexOf.length
+ property fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.indexOf.hasOwnProperty('length'))) {
+ $ERROR('#0: String.prototype.indexOf.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.indexOf.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.indexOf.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.indexOf){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.indexOf){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A9.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A9.js
new file mode 100644
index 000000000..b09575db9
--- /dev/null
+++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.indexOf.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.7_A9
+description: >
+ Checking if deleting the String.prototype.indexOf.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.indexOf.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.indexOf.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.indexOf.length) {
+ $ERROR('#1: delete String.prototype.indexOf.length raturn true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.indexOf.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.indexOf.length; String.prototype.indexOf.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.indexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js
new file mode 100644
index 000000000..a51d889b5
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.lastIndexOf.length property has the attribute
+ ReadOnly
+es5id: 15.5.4.8_A10
+description: >
+ Checking if varying the String.prototype.lastIndexOf.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.lastIndexOf.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.lastIndexOf.length;
+
+String.prototype.lastIndexOf.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.lastIndexOf.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.lastIndexOf.length; String.prototype.lastIndexOf.length = function(){return "shifted";}; String.prototype.lastIndexOf.length === __obj. Actual: '+String.prototype.lastIndexOf.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A11.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A11.js
new file mode 100644
index 000000000..4ffaeb11f
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the lastIndexOf method is 1
+es5id: 15.5.4.8_A11
+description: Checking String.prototype.lastIndexOf.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.lastIndexOf.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.lastIndexOf.hasOwnProperty("length") return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.lastIndexOf.length !== 1) {
+ $ERROR('#2: String.prototype.lastIndexOf.length === 1. Actual: '+String.prototype.lastIndexOf.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T1.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T1.js
new file mode 100644
index 000000000..9c97a086e
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T1
+description: Arguments are false and true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.lastIndexOf = String.prototype.lastIndexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.lastIndexOf(true, false) !== 0) {
+ $ERROR('#1: __instance = new Object(true); __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf(true, false) === 0. Actual: '+__instance.lastIndexOf(true, false) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js
new file mode 100644
index 000000000..4bfefb8de
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T10.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T10
+description: >
+ Call lastIndexOf(searchString, position) function with object
+ arguments
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return NaN;}}
+var __str = "ABB\u0041BABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (lastIndexOf(__obj, __obj2) !== 7) {
+ $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return NaN;}}; var __str = "ABB\u0041BABAB";lastIndexOf(__obj, __obj2) === 7. Actual: '+lastIndexOf(__obj, __obj2) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T12.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T12.js
new file mode 100644
index 000000000..293237feb
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T12.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T12
+description: Argument is string, and instance is array of strings
+---*/
+
+var __instance = new Array('new','zoo','revue');
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.lastIndexOf('new') !== 0) {
+ $ERROR('#1: __instance = new Array(\'new\',\'zoo\',\'revue\'); __instance.lastIndexOf(\'new\') === 0. Actual: '+__instance.lastIndexOf('new') );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__instance.lastIndexOf('zoo') !== 1) {
+ $ERROR('#2: __instance = new Array(\'new\',\'zoo\',\'revue\'); __instance.lastIndexOf(\'zoo\') === 1. Actual: '+__instance.lastIndexOf('zoo') );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T2.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T2.js
new file mode 100644
index 000000000..27072b7b7
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T2
+description: >
+ Arguments are boolean equation, function and null, and instance is
+ Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.lastIndexOf = String.prototype.lastIndexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.lastIndexOf("A"!=="\u0041", function(){return 0;}(),null) !== 0) {
+ $ERROR('#1: __instance = new Boolean; __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf("A"!=="\\u0041", function(){return 0;}(),null) === 0. Actual: '+__instance.lastIndexOf("A"!=="\u0041", function(){return 0;}(),null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T4.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T4.js
new file mode 100644
index 000000000..ebed93a09
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T4.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T4
+description: >
+ Call lastIndexOf(searchString, position) function without
+ arguments of string
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString() evaluates to "" lastIndexOf() evaluates to lastIndexOf("",0)
+if ("".lastIndexOf() !== -1) {
+ $ERROR('#1: "".lastIndexOf() === -1. Actual: '+("".lastIndexOf()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T5.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T5.js
new file mode 100644
index 000000000..69ab01061
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T5.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T5
+description: >
+ Call lastIndexOf(searchString, position) function with null
+ argument of function object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" lastIndexOf(null) evaluates to lastIndexOf("",0)
+if (function(){return "gnullunazzgnull"}().lastIndexOf(null) !== 11) {
+ $ERROR('#1: function(){return "gnullunazzgnull"}().lastIndexOf(null) === 11. Actual: '+function(){return "gnullunazzgnull"}().lastIndexOf(null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T6.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T6.js
new file mode 100644
index 000000000..9517f5e65
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T6
+description: >
+ Call lastIndexOf(searchString, position) function with x argument
+ of new String object, where x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "" lastIndexOf(undefined) evaluates to lastIndexOf("",0)
+if (new String("undefined").lastIndexOf(x) !== 0) {
+ $ERROR('#1: var x; new String("undefined").lastIndexOf(x) === 0. Actual: '+new String("undefined").lastIndexOf(x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T7.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T7.js
new file mode 100644
index 000000000..a68a8d5ab
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T7.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T7
+description: >
+ Call lastIndexOf(searchString, position) function with undefined
+ argument of string object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" lastIndexOf(undefined) evaluates to lastIndexOf("undefined",0)
+if (String("undefined").lastIndexOf(undefined) !== 0) {
+ $ERROR('#1: String("undefined").lastIndexOf(undefined) === 0. Actual: '+String("undefined").lastIndexOf(undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T8.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T8.js
new file mode 100644
index 000000000..29068e54e
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T8.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T8
+description: >
+ Call lastIndexOf(searchString, position) function with void 0
+ argument of string object
+---*/
+
+var __obj = {toString:function(){}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(void 0) evaluates to "undefined" lastIndexOf(void 0) evaluates to lastIndexOf("undefined",0)
+if (String(__obj).lastIndexOf(void 0) !== 0) {
+ $ERROR('#1: __obj = {toString:function(){}}; String(__obj).lastIndexOf(void 0) === 0. Actual: '+String(__obj).lastIndexOf(void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T9.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T9.js
new file mode 100644
index 000000000..ff3b8527c
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A1_T9.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf(searchString, position)
+es5id: 15.5.4.8_A1_T9
+description: >
+ Call lastIndexOf(searchString, position) function with
+ function(){}() argument of string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" indexOf(undefined) evaluates to indexOf("undefined")
+if (new String(__obj).lastIndexOf(function(){}()) !== 0) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).lastIndexOf(function(){}()) === 0. Actual: '+new String(__obj).lastIndexOf(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js
new file mode 100644
index 000000000..2e74ff267
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T1.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.8_A4_T1
+description: Override toString and valueOf functions, valueOf throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){throw "intointeger";}}
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = lastIndexOf(__obj, __obj2);
+ $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception');
+ } catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js
new file mode 100644
index 000000000..1666c8d4e
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.8_A4_T2
+description: >
+ Override toString and valueOf functions, second toString throw
+ exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}}
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = lastIndexOf(__obj, __obj2);
+ $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception');
+ } catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T3.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T3.js
new file mode 100644
index 000000000..d654ae223
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T3.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.8_A4_T3
+description: Override toString and valueOf functions
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return {};},toString:function(){}}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041BABAB".lastIndexOf(__obj, __obj2)!==7) {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){}}; "ABB\\u0041BABAB".lastIndexOf(__obj, __obj2)===7. Actual: '+("ABB\u0041BABAB".lastIndexOf(__obj, __obj2)));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js
new file mode 100644
index 000000000..732a46ec5
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T4.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.8_A4_T4
+description: Override toString and valueOf functions, and they throw exceptions
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}};
+var __obj2 = {valueOf:function(){throw "intoint";}};
+var __instance = new Number(10001.10001);
+Number.prototype.lastIndexOf=String.prototype.lastIndexOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__instance){
+ try {
+ var x = lastIndexOf(__obj, __obj2);
+ $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception');
+ } catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T5.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T5.js
new file mode 100644
index 000000000..58ab508d7
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T5.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument.
+ Then Call ToString(searchString) and Call ToNumber(position)
+es5id: 15.5.4.8_A4_T5
+description: >
+ Override toString and valueOf functions, first and second valueOf
+ throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}};
+
+var __obj2 = {valueOf:function(){throw "intointeger";}};
+
+__FACTORY.prototype.lastIndexOf = String.prototype.lastIndexOf;
+
+var __instance = new __FACTORY(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __instance.lastIndexOf(__obj, __obj2);
+ $FAIL('#1: var x = __instance.lastIndexOf(__obj, __obj2) lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __FACTORY( value ) {
+ this.value = value;
+ this.toString = function() { return new Number; };
+ this.valueOf=function(){return this.value+""};
+}
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A6.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A6.js
new file mode 100644
index 000000000..96170a0ca
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf has not prototype property
+es5id: 15.5.4.8_A6
+description: Checking String.prototype.lastIndexOf.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.lastIndexOf.prototype !== undefined) {
+ $ERROR('#1: String.prototype.lastIndexOf.prototype === undefined. Actual: '+String.prototype.lastIndexOf.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A7.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A7.js
new file mode 100644
index 000000000..e813df59b
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.lastIndexOf can't be used as constructor
+es5id: 15.5.4.8_A7
+description: Checking if creating the String.prototype.lastIndexOf object fails
+includes:
+ - $PRINT.js
+ - $FAIL.js
+---*/
+
+var __FACTORY = String.prototype.lastIndexOf;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.lastIndexOf; __instance = new __FACTORY lead to throwing exception');
+} catch (e) {
+ $PRINT(e);
+}
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js
new file mode 100644
index 000000000..5aadb31e5
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A8.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.lastIndexOf.length property has the attribute
+ DontEnum
+es5id: 15.5.4.8_A8
+description: >
+ Checking if enumerating the String.prototype.lastIndexOf.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.lastIndexOf.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.lastIndexOf.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.lastIndexOf.propertyIsEnumerable(\'length\') return false. Actual: '+String.prototype.lastIndexOf.propertyIsEnumerable('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+count=0;
+
+for (p in String.prototype.lastIndexOf){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.lastIndexOf){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A9.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A9.js
new file mode 100644
index 000000000..63f376f36
--- /dev/null
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.lastIndexOf.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.8_A9
+description: >
+ Checking if deleting the String.prototype.lastIndexOf.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.lastIndexOf.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.lastIndexOf.length) {
+ $ERROR('#1: delete String.prototype.lastIndexOf.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.lastIndexOf.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.lastIndexOf.length; String.prototype.lastIndexOf.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/localeCompare/15.5.4.9_3.js b/test/built-ins/String/prototype/localeCompare/15.5.4.9_3.js
new file mode 100644
index 000000000..06517ec3a
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/15.5.4.9_3.js
@@ -0,0 +1,23 @@
+// Copyright 2013 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+es5id: 15.5.4.9_3
+description: >
+ Tests that String.prototype.localeCompare treats a missing "that"
+ argument, undefined, and "undefined" as equivalent.
+author: Norbert Lindenberg
+---*/
+
+var thisValues = ["a", "t", "u", "undefined", "UNDEFINED", "nicht definiert", "xyz", "未定义"];
+
+var i;
+for (i = 0; i < thisValues.length; i++) {
+ var thisValue = thisValues[i];
+ if (thisValue.localeCompare() !== thisValue.localeCompare(undefined)) {
+ $ERROR("String.prototype.localeCompare does not treat missing 'that' argument as undefined.");
+ }
+ if (thisValue.localeCompare(undefined) !== thisValue.localeCompare("undefined")) {
+ $ERROR("String.prototype.localeCompare does not treat undefined 'that' argument as \"undefined\".");
+ }
+}
diff --git a/test/built-ins/String/prototype/localeCompare/15.5.4.9_CE.js b/test/built-ins/String/prototype/localeCompare/15.5.4.9_CE.js
new file mode 100644
index 000000000..365a80595
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/15.5.4.9_CE.js
@@ -0,0 +1,84 @@
+// Copyright 2012 Norbert Lindenberg. All rights reserved.
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// Copyright 2013 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+es5id: 15.5.4.9_CE
+description: >
+ Tests that String.prototype.localeCompare returns 0 when
+ comparing Strings that are considered canonically equivalent by
+ the Unicode standard.
+author: Norbert Lindenberg
+---*/
+
+// pairs with characters not in Unicode 3.0 are commented out
+var pairs = [
+ // example from Unicode 5.0, section 3.7, definition D70
+ ["o\u0308", "ö"],
+ // examples from Unicode 5.0, chapter 3.11
+ ["ä\u0323", "a\u0323\u0308"],
+ ["a\u0308\u0323", "a\u0323\u0308"],
+ ["ạ\u0308", "a\u0323\u0308"],
+ ["ä\u0306", "a\u0308\u0306"],
+ ["ă\u0308", "a\u0306\u0308"],
+ // example from Unicode 5.0, chapter 3.12
+ ["\u1111\u1171\u11B6", "퓛"],
+ // examples from UTS 10, Unicode Collation Algorithm
+ ["Å", "Å"],
+ ["Å", "A\u030A"],
+ ["x\u031B\u0323", "x\u0323\u031B"],
+ ["ự", "ụ\u031B"],
+ ["ự", "u\u031B\u0323"],
+ ["ự", "ư\u0323"],
+ ["ự", "u\u0323\u031B"],
+ // examples from UAX 15, Unicode Normalization Forms
+ ["Ç", "C\u0327"],
+ ["q\u0307\u0323", "q\u0323\u0307"],
+ ["가", "\u1100\u1161"],
+ ["Å", "A\u030A"],
+ ["Ω", "Ω"],
+ ["Å", "A\u030A"],
+ ["ô", "o\u0302"],
+ ["ṩ", "s\u0323\u0307"],
+ ["ḋ\u0323", "d\u0323\u0307"],
+ ["ḋ\u0323", "ḍ\u0307"],
+ ["q\u0307\u0323", "q\u0323\u0307"],
+ // examples involving supplementary characters from UCD NormalizationTest.txt
+// ["\uD834\uDD5E", "\uD834\uDD57\uD834\uDD65"],
+// ["\uD87E\uDC2B", "北"]
+];
+
+// Detect whether we are using locale-sensitive comparisons or a bitwise comparison
+if("a".localeCompare("Z") < 0) {
+ // We are using locale-sensitive comparison, so all pairs should be canonically equivalent
+ var i;
+ for (i = 0; i < pairs.length; i++) {
+ var pair = pairs[i];
+ if (pair[0].localeCompare(pair[1]) !== 0) {
+ $ERROR("String.prototype.localeCompare considers " + pair[0] + " (" + toU(pair[0]) +
+ ") ≠ " + pair[1] + " (" + toU(pair[1]) + ").");
+ }
+ }
+} else {
+ // We are using bitwise comparison, so all pairs should not be equivalent
+ var i;
+ for (i = 0; i < pairs.length; i++) {
+ var pair = pairs[i];
+ if (pair[0].localeCompare(pair[1]) === 0) {
+ $ERROR("String.prototype.localeCompare considers " + pair[0] + " (" + toU(pair[0]) +
+ ") = " + pair[1] + " (" + toU(pair[1]) + ").");
+ }
+ }
+}
+
+function toU(s) {
+ var result = "";
+ var escape = "\\u0000";
+ var i;
+ for (i = 0; i < s.length; i++) {
+ var hex = s.charCodeAt(i).toString(16);
+ result += escape.substring(0, escape.length - hex.length) + hex;
+ }
+ return result;
+}
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js
new file mode 100644
index 000000000..d6f4dbd2e
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.localeCompare.length property has the attribute
+ ReadOnly
+es5id: 15.5.4.9_A10
+description: >
+ Checking if varying the String.prototype.localeCompare.length
+ property fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.localeCompare.hasOwnProperty('length'))) {
+ $ERROR('#1: String.prototype.localeCompare.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.localeCompare.length;
+
+String.prototype.localeCompare.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.localeCompare.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.localeCompare.length; String.prototype.localeCompare.length = function(){return "shifted";}; String.prototype.localeCompare.length === __obj. Actual: '+String.prototype.localeCompare.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A11.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A11.js
new file mode 100644
index 000000000..4cd0b2bce
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the localeCompare method is 1
+es5id: 15.5.4.9_A11
+description: Checking String.prototype.localeCompare.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.localeCompare.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.localeCompare.hasOwnProperty("length") return true. Actual: '+String.prototype.localeCompare.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.localeCompare.length !== 1) {
+ $ERROR('#2: String.prototype.localeCompare.length === 1. Actual: '+String.prototype.localeCompare.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T1.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T1.js
new file mode 100644
index 000000000..36c1e7019
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T1.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.localeCompare(that)
+es5id: 15.5.4.9_A1_T1
+description: This string is symbol and arguments are symbols
+---*/
+
+var str1 = new String("h");
+//CHECK#1
+var str2 = new String ("\x68");
+if (str1.localeCompare(str2)!==0){
+ $ERROR('#1: var str1 = new String("h"); var str2 = new String ("\\x68"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2));
+}
+
+//CHECK#2
+var str2 = new String ("\u0068");
+if (str1.localeCompare(str2)!==0){
+ $ERROR('#2: var str1 = new String("h"); var str2 = new String ("\\u0068"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2));
+}
+
+//CHECK#3
+var str2 = new String ("h");
+if (str1.localeCompare(str2)!==0){
+ $ERROR('#3: var str1 = new String("h"); var str2 = new String ("h"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2));
+}
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T2.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T2.js
new file mode 100644
index 000000000..be41eeb44
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T2.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.localeCompare(that)
+es5id: 15.5.4.9_A1_T2
+description: >
+ Call string_1.localeCompare(string_2) is equal
+ -string_2.localeCompare(string_1)
+---*/
+
+//CHECK#1
+var str1 = "h";
+var str2 = "H";
+if (str1.localeCompare(str2)!==-str2.localeCompare(str1)){
+ $ERROR('#1.1: var str1 = "h"; var str2 = "H"; str1.localeCompare(str2)===-str2.localeCompare(str1). Actual: '+str1.localeCompare(str2));
+}
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A6.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A6.js
new file mode 100644
index 000000000..19001efc7
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.localeCompare has not prototype property
+es5id: 15.5.4.9_A6
+description: Checking String.prototype.localeCompare.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.localeCompare.prototype !== undefined) {
+ $ERROR('#1: String.prototype.localeCompare.prototype === undefined. Actual: '+String.prototype.localeCompare.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A7.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A7.js
new file mode 100644
index 000000000..6b86b46c3
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A7.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.localeCompare can't be used as constructor
+es5id: 15.5.4.9_A7
+description: >
+ Checking if creating the String.prototype.localeCompare object
+ fails
+includes:
+ - $FAIL.js
+ - Test262Error.js
+---*/
+
+var __FACTORY = String.prototype.localeCompare;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.localeCompare; __instance = new __FACTORY lead to throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js
new file mode 100644
index 000000000..c09dc943d
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A8.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.localeCompare.length property has the attribute
+ DontEnum
+es5id: 15.5.4.9_A8
+description: >
+ Checking if enumerating the String.prototype.localeCompare.length
+ property fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.localeCompare.hasOwnProperty('length'))) {
+ $ERROR('#0: String.prototype.localeCompare.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.localeCompare.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.localeCompare.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.localeCompare){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.localeCompare){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A9.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A9.js
new file mode 100644
index 000000000..82e853105
--- /dev/null
+++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A9.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.localeCompare.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.9_A9
+description: >
+ Checking if deleting the String.prototype.localeCompare.length
+ property fails
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.localeCompare.hasOwnProperty('length'))) {
+ $ERROR('#0: String.prototype.localeCompare.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.localeCompare.length) {
+ $ERROR('#1: delete String.prototype.localeCompare.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.localeCompare.hasOwnProperty('length')) {
+ $ERROR('#2: delete String.prototype.localeCompare.length; String.prototype.localeCompare.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A10.js b/test/built-ins/String/prototype/match/S15.5.4.10_A10.js
new file mode 100644
index 000000000..c15db2dae
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.match.length property has the attribute ReadOnly
+es5id: 15.5.4.10_A10
+description: >
+ Checking if varying the String.prototype.match.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.match.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.match.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.match.length;
+
+String.prototype.match.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.match.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.match.length; String.prototype.match.length = function(){return "shifted";}; String.prototype.match.length === __obj. Actual: '+String.prototype.match.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A11.js b/test/built-ins/String/prototype/match/S15.5.4.10_A11.js
new file mode 100644
index 000000000..a03266abf
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the match method is 1
+es5id: 15.5.4.10_A11
+description: Checking String.prototype.match.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.match.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.match.hasOwnProperty("length") return true. Actual: '+String.prototype.match.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.match.length !== 1) {
+ $ERROR('#2: String.prototype.match.length === 1. Actual: '+String.prototype.match.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T1.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T1.js
new file mode 100644
index 000000000..62c178186
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T1
+description: Arguments is true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.match = String.prototype.match;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.match(true)[0] !== "true") {
+ $ERROR('#1: __instance = new Object(true); __instance.match = String.prototype.match; __instance.match(true)[0] === "true". Actual: '+__instance.match(true)[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js
new file mode 100644
index 000000000..06c8d910b
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T10.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T10
+description: Call match (regexp) function with object argument
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __str = "ABB\u0041BABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (match(__obj)[0] !=="AB") {
+ $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __str = "ABB\u0041BABAB"; match(__obj)[0] ==="AB". Actual: '+match(__obj)[0] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js
new file mode 100644
index 000000000..bcf3d44d3
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T11.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T11
+description: >
+ Override toString function, toString throw exception, then call
+ match (regexp) function with this object as argument
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}}
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = match(__obj);
+ $FAIL('#1: "var x = match(__obj)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js
new file mode 100644
index 000000000..3a9a6bf4f
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T12.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T12
+description: >
+ Override toString and valueOf functions, valueOf throw exception,
+ then call match (regexp) function with this object as argument
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = match(__obj);
+ $FAIL('#1: "var x = match(__obj)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T13.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T13.js
new file mode 100644
index 000000000..64e9be70b
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T13.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T13
+description: >
+ Override toString and valueOf functions, then call match (regexp)
+ function with this object as argument
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041B\u0031ABAB\u0031BBAA".match(__obj)[0] !=="1") {
+ $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; "ABB\\u0041B\\u0031ABAB\\u0031BBAA".match(__obj)[0] ==="1". Actual: '+("ABB\u0041B\u0031ABAB\u0031BBAA".match(__obj)[0]) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if ("ABB\u0041B\u0031ABAB\u0031BBAA".match(__obj).length !== 1) {
+ $ERROR('#3: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; "ABB\\u0041B\\u0031ABAB\\u0031BBAA".match(__obj).length === 1. Actual: '+("ABB\u0041B\u0031ABAB\u0031BBAA".match(__obj).length) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T14.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T14.js
new file mode 100644
index 000000000..fb112c3fa
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T14.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T14
+description: >
+ Call match (regexp) function with RegExp object as argument from
+ string
+---*/
+
+var __reg = new RegExp("77");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041BABAB\u0037\u0037BBAA".match(__reg)[0] !== "77") {
+ $ERROR('#1: var __reg = new RegExp("77"); "ABB\\u0041BABAB\\u0037\\u0037BBAA".match(__reg)[0] === "77". Actual: '+("ABB\u0041BABAB\u0037\u0037BBAA".match(__reg)[0]) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T2.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T2.js
new file mode 100644
index 000000000..65488e526
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T2
+description: >
+ Argument is function that return boolean, and instance is Boolean
+ object
+---*/
+
+var __instance = new Boolean;
+
+__instance.match = String.prototype.match;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.match(function(){return false;}())[0] !== "false") {
+ $ERROR('#1: __instance = new Boolean; __instance.match = String.prototype.match; __instance.match(function(){return false;}())[0] === "false". Actual: '+__instance.match(function(){return false;}())[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js
new file mode 100644
index 000000000..32bf29539
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T3
+description: Checking by using eval
+includes: [fnGlobalObject.js]
+---*/
+
+var match = String.prototype.match.bind(fnGlobalObject());
+
+try {
+ fnGlobalObject().toString = Object.prototype.toString;
+} catch (e) { ; }
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((fnGlobalObject().toString === Object.prototype.toString) && //Ensure we could overwrite global obj's toString
+ (match(eval("\"bj\""))[0] !== "bj")) {
+ $ERROR('#1: match = String.prototype.match.bind(this); match(eval("\\"bj\\""))[0] === "bj". Actual: '+match(eval("\"bj\""))[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T4.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T4.js
new file mode 100644
index 000000000..d81fcf57f
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T4.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T4
+description: Call match (regexp) function without arguments of string
+---*/
+
+var __matched = "".match();
+
+var __expected = RegExp().exec("");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__matched.length !== __expected.length) {
+ $ERROR('#1: __matched = "".match(); __expected = RegExp().exec(""); __matched.length === __expected.length. Actual: '+__matched.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__matched.index !== __expected.index) {
+ $ERROR('#2: __matched = "".match(); __expected = RegExp().exec(""); __matched.index === __expected.index. Actual: '+__matched.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__matched.input !== __expected.input) {
+ $ERROR('#3: __matched = "".match(); __expected = RegExp().exec(""); __matched.input === __expected.input. Actual: '+__matched.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__matched[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __matched = "".match(); __expected = RegExp().exec(""); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T5.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T5.js
new file mode 100644
index 000000000..f0a41f16f
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T5
+description: Call match (regexp) function with null argument of function object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" match(null) evaluates to match("null")
+if (function(){return "gnulluna"}().match(null)[0] !== "null") {
+ $ERROR('#1: function(){return "gnulluna"}().match(null)[0] === "null". Actual: '+function(){return "gnulluna"}().match(null)[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T6.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T6.js
new file mode 100644
index 000000000..9fd224f52
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T6.js
@@ -0,0 +1,50 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T6
+description: >
+ Call match (regexp) function with x argument of new String object,
+ where x is undefined variable
+---*/
+
+var __matched = new String("undefined").match(x);
+
+var __expected = RegExp(x).exec("undefined");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__matched.length !== __expected.length) {
+ $ERROR('#1: __matched = new String("undefined").match(x); __expected = RegExp(x).exec("undefined"); __matched.length === __expected.length. Actual: '+__matched.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__matched.index !== __expected.index) {
+ $ERROR('#2: __matched = new String("undefined").match(x); __expected = RegExp(x).exec("undefined"); __matched.index === __expected.index. Actual: '+__matched.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__matched.input !== __expected.input) {
+ $ERROR('#3: __matched = new String("undefined").match(x); __expected = RegExp(x).exec("undefined"); __matched.input === __expected.input. Actual: '+__matched.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__matched[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __matched = new String("undefined").match(x); __expected = RegExp(x).exec("undefined"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T7.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T7.js
new file mode 100644
index 000000000..b59c69173
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T7.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T7
+description: >
+ Call match (regexp) function with undefined argument of string
+ object
+---*/
+
+var __matched = String("undefined").match(undefined);
+
+var __expected = RegExp(undefined).exec("undefined");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__matched.length !== __expected.length) {
+ $ERROR('#1: __matched = String("undefined").match(undefined); __expected = RegExp(undefined).exec("undefined"); __matched.length === __expected.length. Actual: '+__matched.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__matched.index !== __expected.index) {
+ $ERROR('#2: __matched = String("undefined").match(undefined); __expected = RegExp(undefined).exec("undefined"); __matched.index === __expected.index. Actual: '+__matched.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__matched.input !== __expected.input) {
+ $ERROR('#3: __matched = String("undefined").match(undefined); __expected = RegExp(undefined).exec("undefined"); __matched.input === __expected.input. Actual: '+__matched.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__matched[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __matched = String("undefined").match(undefined); __expected = RegExp(undefined).exec("undefined"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T8.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T8.js
new file mode 100644
index 000000000..13aa23e55
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T8.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T8
+description: Call match (regexp) function with void 0 argument of string object;
+---*/
+
+var __obj = {toString:function(){}};
+
+var __matched = String(__obj).match(void 0);
+
+var __expected = RegExp(void 0).exec("undefined");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__matched.length !== __expected.length) {
+ $ERROR('#1: __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec("undefined"); __matched.length === __expected.length. Actual: '+__matched.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__matched.index !== __expected.index) {
+ $ERROR('#2: __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec("undefined"); __matched.index === __expected.index. Actual: '+__matched.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__matched.input !== __expected.input) {
+ $ERROR('#3: __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec("undefined"); __matched.input === __expected.input. Actual: '+__matched.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__matched[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec("undefined"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T9.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T9.js
new file mode 100644
index 000000000..a9ce29da4
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T9.js
@@ -0,0 +1,53 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match (regexp)
+es5id: 15.5.4.10_A1_T9
+description: >
+ Call match (regexp) function with function(){}() argument of
+ string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+var __matched = new String(__obj).match(function(){}());
+
+var __expected = RegExp(undefined).exec("undefined");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__matched.length !== __expected.length) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec("undefined"); __matched.length === __expected.length. Actual: '+__matched.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__matched.index !== __expected.index) {
+ $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec("undefined"); __matched.index === __expected.index. Actual: '+__matched.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__matched.input !== __expected.input) {
+ $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec("undefined"); __matched.input === __expected.input. Actual: '+__matched.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__matched[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec("undefined"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T1.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T1.js
new file mode 100644
index 000000000..4f74b0689
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T1.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T1
+description: Regular expression is 3
+---*/
+
+var __string = "1234567890";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(3)[0]!== "3") {
+ $ERROR('#1: __string = "1234567890"; __string.match(3)[0]=== "3". Actual: '+__string.match(3)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(3).length !==1) {
+ $ERROR('#2: __string = "1234567890"; __string.match(3).length ===1. Actual: '+__string.match(3).length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__string.match(3).index !==2) {
+ $ERROR('#3: __string = "1234567890"; __string.match(3).index ===2. Actual: '+__string.match(3).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__string.match(3).input !==__string) {
+ $ERROR('#4: __string = "1234567890"; __string.match(3).input ===__string. Actual: '+__string.match(3).input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T10.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T10.js
new file mode 100644
index 000000000..5a5c5f382
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T10.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T10
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is
+ undefined. And regular expression object have property lastIndex
+ = tested_string.lastIndexOf("0")
+---*/
+
+var __string = "Boston, MA 02134";
+
+var __matches=["02134", "02134", undefined];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/;
+
+__re.lastIndex = __string.lastIndexOf("0");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== 3) {
+ $ERROR('#1: __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(__re).index !==__string.lastIndexOf("0")) {
+ $ERROR('#2: __string.match(__re).index ===__string.lastIndexOf("0"). Actual: '+__string.match(__re).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(__re)[mi]!==__matches[mi]) {
+ $ERROR('#3.'+mi+': __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T11.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T11.js
new file mode 100644
index 000000000..8bf987ea9
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T11.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T11
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is
+ undefined. And regular expression object have property lastIndex
+ = tested_string.lastIndexOf("0")+1
+---*/
+
+var __string = "Boston, MA 02134";
+
+var __matches=["02134", "02134", undefined];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/;
+
+__re.lastIndex = __string.lastIndexOf("0")+1;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== 3) {
+ $ERROR('#1: __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(__re).index !==__string.lastIndexOf("0")) {
+ $ERROR('#2: __string.match(__re).index ===__string.lastIndexOf("0"). Actual: '+__string.match(__re).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(__re)[mi]!==__matches[mi]) {
+ $ERROR('#3.'+mi+': __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T12.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T12.js
new file mode 100644
index 000000000..c89079514
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T12.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T12
+description: >
+ Regular expression is variable that have value /([\d]{5})([-\
+ ]?[\d]{4})?$/g
+---*/
+
+var __matches=["02134"];
+
+var __string = "Boston, MA 02134";
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== __matches.length) {
+ $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(__re)[0]!==__matches[0]) {
+ $ERROR('#2: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T13.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T13.js
new file mode 100644
index 000000000..4a6175599
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T13.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T13
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g. And regular
+ expression object have property lastIndex = 0
+---*/
+
+var __matches=["02134"];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/g;
+__re.lastIndex = 0;
+
+var __string = "Boston, MA 02134";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== __matches.length) {
+ $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__string.match(__re)[0]!==__matches[0]) {
+ $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T14.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T14.js
new file mode 100644
index 000000000..92b559388
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T14.js
@@ -0,0 +1,34 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T14
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g. And regular
+ expression object have property lastIndex = tested_string.length
+---*/
+
+var __string = "Boston, MA 02134";
+
+var __matches=["02134"];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/g;
+
+__re.lastIndex = __string.length;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== __matches.length) {
+ $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__string.match(__re)[0]!==__matches[0]) {
+ $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T15.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T15.js
new file mode 100644
index 000000000..b2101492c
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T15.js
@@ -0,0 +1,35 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T15
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. And regular
+ expression object have property lastIndex =
+ tested_string.lastIndexOf("0")
+---*/
+
+var __string = "Boston, MA 02134";
+
+var __matches=["02134"];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/g;
+
+__re.lastIndex = __string.lastIndexOf("0");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== __matches.length) {
+ $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__string.match(__re)[0]!==__matches[0]) {
+ $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T16.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T16.js
new file mode 100644
index 000000000..ac72b075f
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T16.js
@@ -0,0 +1,35 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T16
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. And regular
+ expression object have property lastIndex =
+ tested_string.lastIndexOf("0")+1
+---*/
+
+var __string = "Boston, MA 02134";
+
+var __matches=["02134"];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/g;
+
+__re.lastIndex = __string.lastIndexOf("0")+1;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== __matches.length) {
+ $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__string.match(__re)[0]!==__matches[0]) {
+ $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T17.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T17.js
new file mode 100644
index 000000000..9cd4f7848
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T17.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T17
+description: Regular expression is /0./
+---*/
+
+var __re = /0./;
+
+var __num = 10203040506070809000;
+
+Number.prototype.match = String.prototype.match;
+
+//__matches = ["02"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__num.match(__re)[0]!== "02") {
+ $ERROR('#1: __num.match(__re)[0]=== "02". Actual: '+__num.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__num.match(__re).length !==1) {
+ $ERROR('#2: __num.match(__re).length ===1. Actual: '+__num.match(__re).length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__num.match(__re).index !==1) {
+ $ERROR('#3: __num.match(__re).index ===1. Actual: '+__num.match(__re).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__num.match(__re).input !==String(__num)) {
+ $ERROR('#4: __num.match(__re).input ===String(__num). Actual: '+__num.match(__re).input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T18.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T18.js
new file mode 100644
index 000000000..9f8c8b30e
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T18.js
@@ -0,0 +1,50 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T18
+description: >
+ Regular expression is /0./. And regular expression object have
+ property lastIndex = 0
+---*/
+
+var __re = /0./;
+
+__re.lastIndex = 0;
+
+var __num = 10203040506070809000;
+
+Number.prototype.match = String.prototype.match;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__num.match(__re)[0]!== "02") {
+ $ERROR('#1: __num.match(__re)[0]=== "02". Actual: '+__num.match(__re)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__num.match(__re).length !==1) {
+ $ERROR('#2: __num.match(__re).length ===1. Actual: '+__num.match(__re).length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__num.match(__re).index !==1) {
+ $ERROR('#3: __num.match(__re).index ===1. Actual: '+__num.match(__re).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__num.match(__re).input !==String(__num)) {
+ $ERROR('#4: __num.match(__re).input ===String(__num). Actual: '+__num.match(__re).input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T2.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T2.js
new file mode 100644
index 000000000..27e46bbb2
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T2.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T2
+description: Regular expression is /34/g
+---*/
+
+var __matches=["34","34","34"];
+
+var __string = "343443444";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(/34/g).length!== 3) {
+ $ERROR('#1: __string = "343443444"; __string.match(/34/g).length=== 3. Actual: '+__string.match(/34/g).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(/34/g)[mi]!==__matches[mi]) {
+ $ERROR('#2.'+mi+': __matches=["34","34","34"]; __string = "343443444"; __string.match(/34/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/34/g)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T3.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T3.js
new file mode 100644
index 000000000..26e6dd68e
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T3.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T3
+description: Regular expression is /\d{1}/g
+---*/
+
+var __matches=["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
+
+var __string = "123456abcde7890";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(/\d{1}/g).length!== 10) {
+ $ERROR('#1: __string = "123456abcde7890"; __string.match(/\\d{1}/g).length=== 10. Actual: '+__string.match(/\d{1}/g).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(/\d{1}/g)[mi]!==__matches[mi]) {
+ $ERROR('#2.'+mi+': __matches=["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]; __string = "123456abcde7890"; __string.match(/\\d{1}/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/\d{1}/g)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T4.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T4.js
new file mode 100644
index 000000000..37c6ec04e
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T4.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T4
+description: Regular expression is /\d{2}/g
+---*/
+
+var __matches=["12", "34", "56", "78", "90"];
+
+var __string = "123456abcde7890";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(/\d{2}/g).length!== 5) {
+ $ERROR('#1: __string = "123456abcde7890"; __string.match(/\\d{2}/g).length=== 5. Actual: '+__string.match(/\d{2}/g).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(/\d{2}/g)[mi]!==__matches[mi]) {
+ $ERROR('#2.'+mi+': __matches=["12", "34", "56", "78", "90"]; __string = "123456abcde7890"; __string.match(/\\d{2}/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/\d{2}/g)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T5.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T5.js
new file mode 100644
index 000000000..22044d86b
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T5.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T5
+description: Regular expression is /\D{2}/g
+---*/
+
+var __matches=["ab", "cd"];
+
+var __string = "123456abcde7890";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(/\D{2}/g).length!== 2) {
+ $ERROR('#1: __string = "123456abcde7890"; __string.match(/\\D{2}/g).length=== 2. Actual: '+__string.match(/\D{2}/g).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(/\D{2}/g)[mi]!==__matches[mi]) {
+ $ERROR('#2.'+mi+': __matches=["ab", "cd"]; __string = "123456abcde7890"; __string.match(/\\D{2}/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/\D{2}/g)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T6.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T6.js
new file mode 100644
index 000000000..1be783adf
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T6.js
@@ -0,0 +1,60 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T6
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is
+ void 0
+---*/
+
+var __string = "Boston, Mass. 02134";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[0]!== "02134") {
+ $ERROR('#1: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[0]=== "02134". Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[1]!== "02134") {
+ $ERROR('#2: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[1]=== "02134". Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[2]!== void 0) {
+ $ERROR('#3: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[2]=== void 0. Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[2]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).length !==3) {
+ $ERROR('#4: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).length ===3. Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).index !==14) {
+ $ERROR('#5: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).index ===14. Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).input !==__string) {
+ $ERROR('#6: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).input ===__string. Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T7.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T7.js
new file mode 100644
index 000000000..48a7ba461
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T7.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T7
+description: Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g
+---*/
+
+var __matches=["02134"];
+
+var __string = "Boston, Mass. 02134";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g).length!== 1) {
+ $ERROR('#1: __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/g).length=== 1. Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g)[0]!==__matches[0]) {
+ $ERROR('#2: __matches=["02134"]; __string = "Boston, Mass. 02134"; __string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/g)[0]===__matches[0]. Actual: '+__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g)[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T8.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T8.js
new file mode 100644
index 000000000..27cf7c407
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T8.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T8
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is
+ undefined. And regular expression object have property lastIndex
+ = 0
+---*/
+
+var __matches=["02134", "02134", undefined];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/;
+__re.lastIndex = 0;
+
+var __string = "Boston, MA 02134";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== 3) {
+ $ERROR('#1: __string = "Boston, MA 02134"; __re = /([\d]{5})([-\ ]?[\d]{4})?$/; __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(__re).index !==__string.lastIndexOf("0")) {
+ $ERROR('#2: __string = "Boston, MA 02134"; __re = /([\d]{5})([-\ ]?[\d]{4})?$/; __re.lastIndex = 0; __string.match(__re).index ===__string.lastIndexOf("0"). Actual: '+__string.match(__re).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(__re)[mi]!==__matches[mi]) {
+ $ERROR('#3.'+mi+': __string = "Boston, MA 02134"; __re = /([\d]{5})([-\ ]?[\d]{4})?$/; __matches=["02134", "02134", undefined]; __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A2_T9.js b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T9.js
new file mode 100644
index 000000000..b37f8ec73
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A2_T9.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: match returns array as specified in 15.10.6.2
+es5id: 15.5.4.10_A2_T9
+description: >
+ Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is
+ undefined. And regular expression object have property lastIndex
+ = tested_string.length
+---*/
+
+var __string = "Boston, MA 02134";
+
+var __matches=["02134", "02134", undefined];
+
+var __re = /([\d]{5})([-\ ]?[\d]{4})?$/;
+
+__re.lastIndex = __string.length;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.match(__re).length!== 3) {
+ $ERROR('#1: __string = "Boston, MA 02134"; __re = /([\d]{5})([-\ ]?[\d]{4})?$/; __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__string.match(__re).index !==__string.lastIndexOf("0")) {
+ $ERROR('#2: __string = "Boston, MA 02134"; __re = /([\d]{5})([-\ ]?[\d]{4})?$/; __re.lastIndex = __string.length; __string.match(__re).index ===__string.lastIndexOf("0"). Actual: '+__string.match(__re).index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var mi=0; mi<__matches.length; mi++) {
+ if (__string.match(__re)[mi]!==__matches[mi]) {
+ $ERROR('#3.'+mi+': __string = "Boston, MA 02134"; __re = /([\d]{5})([-\ ]?[\d]{4})?$/; __matches=["02134", "02134", undefined]; __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A6.js b/test/built-ins/String/prototype/match/S15.5.4.10_A6.js
new file mode 100644
index 000000000..e7b44f13f
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match has not prototype property
+es5id: 15.5.4.10_A6
+description: Checking String.prototype.match.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.match.prototype !== undefined) {
+ $ERROR('#1: String.prototype.match.prototype === undefined. Actual: '+String.prototype.match.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A7.js b/test/built-ins/String/prototype/match/S15.5.4.10_A7.js
new file mode 100644
index 000000000..fa36f4a59
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.match can't be used as constructor
+es5id: 15.5.4.10_A7
+description: Checking if creating "String.prototype.match object" fails
+includes:
+ - $FAIL.js
+ - Test262Error.js
+---*/
+
+var __FACTORY = String.prototype.match;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.match; __FACTORY = String.prototype.match; __instance = new __FACTORY lead to throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A8.js b/test/built-ins/String/prototype/match/S15.5.4.10_A8.js
new file mode 100644
index 000000000..9f38ffa79
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.match.length property has the attribute DontEnum
+es5id: 15.5.4.10_A8
+description: >
+ Checking if enumerating the String.prototype.match.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.match.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.match.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.match.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.match.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.match){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.match){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A9.js b/test/built-ins/String/prototype/match/S15.5.4.10_A9.js
new file mode 100644
index 000000000..868d5007e
--- /dev/null
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.match.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.10_A9
+description: >
+ Checking if deleting the String.prototype.match.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.match.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.match.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.match.length) {
+ $ERROR('#1: delete String.prototype.match.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.match.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.match.length; String.prototype.match.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.match.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/15.5.4.11-1.js b/test/built-ins/String/prototype/replace/15.5.4.11-1.js
new file mode 100644
index 000000000..f6d06993a
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/15.5.4.11-1.js
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.11-1
+description: >
+ 'this' object used by the replaceValue function of a
+ String.prototype.replace invocation
+includes:
+ - runTestCase.js
+ - fnGlobalObject.js
+---*/
+
+function testcase() {
+ var retVal = 'x'.replace(/x/,
+ function() {
+ if (this===fnGlobalObject()) {
+ return 'y';
+ } else {
+ return 'z';
+ }
+ });
+ return retVal==='y';
+}
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js
new file mode 100644
index 000000000..b599c2f3d
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.replace.length property has the attribute ReadOnly
+es5id: 15.5.4.11_A10
+description: >
+ Checking if varying the String.prototype.replace.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.replace.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.replace.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.replace.length;
+
+String.prototype.replace.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.replace.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.replace.length; String.prototype.replace.length = function(){return "shifted";}; String.prototype.replace.length === __obj. Actual: '+String.prototype.replace.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A11.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A11.js
new file mode 100644
index 000000000..5b9af5f11
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the replace method is 2
+es5id: 15.5.4.11_A11
+description: Checking String.prototype.replace.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.replace.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.replace.hasOwnProperty("length") return true. Actual: '+String.prototype.replace.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.replace.length !== 2) {
+ $ERROR('#2: String.prototype.replace.length === 2. Actual: '+String.prototype.replace.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A12.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A12.js
new file mode 100644
index 000000000..9200fe990
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A12.js
@@ -0,0 +1,24 @@
+// Copyright 2011 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Call replaceValue passing undefined as the this value
+es5id: 15.5.4.11_A12
+description: replaceValue tests that its this value is undefined
+flags: [onlyStrict]
+includes: [$FAIL.js]
+---*/
+
+var global = this;
+'x'.replace(/x/, function() {
+ "use strict";
+
+ if (this === global) {
+ $FAIL('#1: String replace leaks global');
+ }
+ if (this !== undefined) {
+ $FAIL('#2: replaceValue should be called with this===undefined. ' +
+ 'Actual: ' + this);
+ }
+ return 'y';
+});
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T1.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T1.js
new file mode 100644
index 000000000..0ccd9a781
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T1
+description: Arguments are true and 1, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.replace = String.prototype.replace;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.replace(true, 1) !== "1") {
+ $ERROR('#1: __instance = new Object(true); __instance.replace = String.prototype.replace; __instance.replace(true, 1) === "1". Actual: '+__instance.replace(true, 1) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js
new file mode 100644
index 000000000..fb4de5518
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T10.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T10
+description: >
+ Call replace (searchValue, replaceValue) function with object and
+ function arguments of string. Object have overrided toString
+ function
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}};
+
+var __str = "ABB\u0041BABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (replace(__obj, function(){return x;}) !== "undefinedBABABAB") {
+ $ERROR('#1: var x; var __obj = {toString:function(){return "\u0041B";}}; var __str = "ABB\u0041BABAB"; replace(__obj, function(){return x;}) === "undefinedBABABAB". Actual: '+replace(__obj, function(){return x;}) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js
new file mode 100644
index 000000000..5f1994c4a
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T11.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T11
+description: >
+ Call replace (searchValue, replaceValue) function with objects
+ arguments of string object. Objects have overrided toString
+ function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "insearchValue";}};
+var __obj2 = {toString:function(){throw "inreplaceValue";}};
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = replace(__obj,__obj2);
+ $FAIL('#1: "var x = replace(__obj,__obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="insearchValue") {
+ $ERROR('#1.1: Exception === "insearchValue". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js
new file mode 100644
index 000000000..a655b1db8
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T12.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T12
+description: >
+ Call replace (searchValue, replaceValue) function with objects
+ arguments of String object. First objects have overrided toString
+ and valueOf functions, valueOf throw exception. Second objects
+ have overrided toString function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};}, valueOf:function(){throw "insearchValue";}};
+var __obj2 = {toString:function(){throw "inreplaceValue";}};
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = replace(__obj, __obj2);
+ $FAIL('#1: "var x = replace(__obj,__obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="insearchValue") {
+ $ERROR('#1.1: Exception === "insearchValue". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T13.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T13.js
new file mode 100644
index 000000000..352b1e6f4
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T13.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T13
+description: >
+ Call replace (searchValue, replaceValue) function with objects
+ arguments of string. First objects have overrided toString and
+ valueOf functions. Second objects have overrided toString
+ function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};}, valueOf:function(){return 1;}};
+var __obj2 = {toString:function(){throw "inreplaceValue";}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = "ABB\u0041BABAB\u0031BBAA".replace(__obj, __obj2);
+ $FAIL('#1: var x = "ABB\\u0041BABAB\\u0031BBAA".replace(__obj,__obj2) lead to throwing exception');
+} catch (e) {
+ if (e!=="inreplaceValue") {
+ $ERROR('#1.1: Exception === "inreplaceValue". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T14.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T14.js
new file mode 100644
index 000000000..e37a5abec
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T14.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T14
+description: Instance is string, searchValue is regular expression
+---*/
+
+var __reg = new RegExp("77");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041BABAB\u0037\u0037BBAA".replace(__reg, 1) !== "ABBABABAB\u0031BBAA") {
+ $ERROR('#1: var __reg = new RegExp("77"); "ABB\\u0041BABAB\\u0037\\u0037BBAA".replace(__reg, 1) === "ABBABABAB\\u0031BBAA". Actual: '+("ABB\u0041BABAB\u0037\u0037BBAA".replace(__reg, 1)) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T15.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T15.js
new file mode 100644
index 000000000..a34b7f188
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T15.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T15
+description: Instance is Object, searchValue is regular expression
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return /77/}};
+
+var __instance = new Object(1100.00777001);
+
+Object.prototype.replace = String.prototype.replace;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __instance.replace(__obj, 1) === "1100.0017001";
+ $FAIL('#1.0: x = __instance.replace(__obj, 1) === "1100.0017001" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T16.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T16.js
new file mode 100644
index 000000000..c62bdb509
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T16.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T16
+description: Instance is Number, searchValue is regular expression
+includes: [$FAIL.js]
+---*/
+
+var __re = /77/;
+
+var __instance = new Number(1100.00777001);
+
+Number.prototype.replace = String.prototype.replace;
+
+var __obj = {toString:function(){return function(a1,a2,a3){return a2+"z"};}}
+//__obj = function(a1,a2,a3){return a2+"z"};
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __instance.replace(__re, __obj) === "1100.007z7001";
+ $FAIL('#1.0: x = __instance.replace(__obj, 1) === "1100.007z7001" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T17.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T17.js
new file mode 100644
index 000000000..979101a3a
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T17.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T17
+description: Instance is String object, searchValue is regular expression
+---*/
+
+var __re = new RegExp(x,"g");
+
+var __instance = String("asdf");
+
+var __str = "1";
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.replace(__re, __str) !== "1a1s1d1f1") {
+ $ERROR('#1: var x; var __re = new RegExp(x,"g"); __instance = String("asdf"); __str = "1"; __instance.replace(__re, __str) === "1a1s1d1f1". Actual: '+__instance.replace(__re, __str) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T2.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T2.js
new file mode 100644
index 000000000..b8c56f315
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T2.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T2
+description: >
+ Argument is function that return boolean, and instance is Boolean
+ object
+---*/
+
+var __instance = new Boolean;
+
+__instance.replace = String.prototype.replace;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.replace(function(){return false;}(),x) !== "undefined") {
+ $ERROR('#1: var x; __instance = new Boolean; __instance.replace = String.prototype.replace; __instance.replace(function(){return false;}(),x) === "undefined". Actual: '+__instance.replace(function(){return false;}(),x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T4.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T4.js
new file mode 100644
index 000000000..e38a39444
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T4.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T4
+description: >
+ Call replace (searchValue, replaceValue) function with null and
+ function(a1,a2,a3){return a2+"";} arguments of function object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (function(){return "gnulluna"}().replace(null,function(a1,a2,a3){return a2+"";}) !== "g1una") {
+ $ERROR('#1: function(){return "gnulluna"}().replace(null,function(a1,a2,a3){return a2+"";}) === "g1una". Actual: '+function(){return "gnulluna"}().replace(null,function(a1,a2,a3){return a2+"";}) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T5.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T5.js
new file mode 100644
index 000000000..cbd9c74fe
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T5.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T5
+description: >
+ Call replace (searchValue, replaceValue) function with null and
+ Function() arguments of function object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (function(){return "gnulluna"}().replace(null, Function()) !== "gundefineduna") {
+ $ERROR('#1: function(){return "gnulluna"}().replace(null, Function()) === "gundefineduna". Actual: '+function(){return "gnulluna"}().replace(null, Function()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T6.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T6.js
new file mode 100644
index 000000000..b593f4f93
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T6
+description: >
+ Call replace (searchValue, replaceValue) function with x and
+ Function("return arguments[1]+42;") arguments of new String
+ object. x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (new String("undefined").replace(x,Function("return arguments[1]+42;")) !== "42") {
+ $ERROR('#1: var x; new String("undefined").replace(x,Function("return arguments[1]+42;")) === "42". Actual: '+new String("undefined").replace(x,Function("return arguments[1]+42;")) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T7.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T7.js
new file mode 100644
index 000000000..8c2ec1311
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T7
+description: >
+ Call replace (searchValue, replaceValue) function with string and
+ undefined arguments of String object
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String(void 0).replace("e",undefined) !== "undundefinedfined") {
+ $ERROR('#1: String(void 0).replace("e",undefined) === "undundefinedfined". Actual: '+String(void 0).replace("e",undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T8.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T8.js
new file mode 100644
index 000000000..81c9a9c4a
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T8.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T8
+description: >
+ Call replace (searchValue, replaceValue) function with regular
+ expression and void 0 arguments of String object
+---*/
+
+var __obj = {toString:function(){}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String(__obj).replace(/e/g,void 0) !== "undundefinedfinundefinedd") {
+ $ERROR('#1: __obj = {toString:function(){}}; String(__obj).replace(/e/g,void 0) === "undundefinedfinundefinedd". Actual: '+String(__obj).replace(/e/g,void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T9.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T9.js
new file mode 100644
index 000000000..9c4ebe9e2
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A1_T9.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace (searchValue, replaceValue)
+es5id: 15.5.4.11_A1_T9
+description: >
+ Call replace (searchValue, replaceValue) function with functions
+ arguments of new String object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (new String(__obj).replace(function(){}(),__func) !== "undefined0undefined") {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; function __func(a1,a2,a3){return a1+a2+a3;}; new String(__obj).replace(function(){}(),__func) === "undefined0undefined". Actual: '+new String(__obj).replace(function(){}(),__func) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __func(a1,a2,a3){return a1+a2+a3;};
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T1.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T1.js
new file mode 100644
index 000000000..aa67fbe2f
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T1.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T1
+description: >
+ Don`t use $ in replaceValue, searchValue is regular expression
+ /sh/g
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re,'sch')!=='She sells seaschells by the seaschore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/g; __str.replace(__re,\'sch\')===\'She sells seaschells by the seaschore.\'. Actual: '+__str.replace(__re,'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T10.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T10.js
new file mode 100644
index 000000000..90c68fab7
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T10.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T10
+description: Use $' in replaceValue, searchValue is regular expression /sh/
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$'" + 'sch')!=='She sells seaells by the seashore.schells by the seashore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/; __str.replace(__re, "$\'" + \'sch\')===\'She sells seaells by the seashore.schells by the seashore.\'. Actual: '+__str.replace(__re, "$'" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T2.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T2.js
new file mode 100644
index 000000000..cfac34c7b
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T2.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T2
+description: Use $$ in replaceValue, searchValue is regular expression /sh/g
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re,"$$" + 'sch')!=='She sells sea$schells by the sea$schore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/g; __str.replace(__re,"$$" + \'sch\')===\'She sells sea$schells by the sea$schore.\'. Actual: '+__str.replace(__re,"$$" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T3.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T3.js
new file mode 100644
index 000000000..4e92e78b4
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T3.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T3
+description: Use $& in replaceValue, searchValue is regular expression /sh/g
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re,"$&" + 'sch')!=='She sells seashschells by the seashschore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/g; __str.replace(__re,"$&" + \'sch\')===\'She sells seashschells by the seashschore.\'. Actual: '+__str.replace(__re,"$&" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T4.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T4.js
new file mode 100644
index 000000000..97c024ec3
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T4.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T4
+description: Use $` in replaceValue, searchValue is regular expression /sh/g
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$`" + 'sch')!=='She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/g; __str.replace(__re, "$`" + \'sch\')===\'She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.\'. Actual: '+__str.replace(__re, "$`" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T5.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T5.js
new file mode 100644
index 000000000..db6a2a7ed
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T5.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T5
+description: Use $' in replaceValue, searchValue is regular expression /sh/g
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$'" + 'sch')!=='She sells seaells by the seashore.schells by the seaore.schore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/g; __str.replace(__re, "$\'" + \'sch\')===\'She sells seaells by the seashore.schells by the seaore.schore.\'. Actual: '+__str.replace(__re, "$'" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T6.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T6.js
new file mode 100644
index 000000000..0a771031f
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T6
+description: Don`t use $ in replaceValue, searchValue is regular expression /sh/
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, 'sch')!=='She sells seaschells by the seashore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/; __str.replace(__re, \'sch\')===\'She sells seaschells by the seashore.\'. Actual: '+__str.replace(__re, 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js
new file mode 100644
index 000000000..d0a5bad3f
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T7
+description: Use $$ in replaceValue, searchValue is regular expression /sh/
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$$" + 'sch')!=='She sells sea$schells by the seashore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/; __str.replace(__re, "$$" + \'sch\')===\'She sells sea$schells by the seashore.\'. Actual: '+__str.replace(__re, "$$" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T8.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T8.js
new file mode 100644
index 000000000..8be93a91d
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T8.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T8
+description: Use $& in replaceValue, searchValue is regular expression /sh/
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$&" + 'sch')!=='She sells seashschells by the seashore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/; __str.replace(__re, "$&" + \'sch\')===\'She sells seashschells by the seashore.\'. Actual: '+__str.replace(__re, "$&" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T9.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T9.js
new file mode 100644
index 000000000..72d7bba73
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T9.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The $ replacements are done left-to-right, and, once such are placement is performed, the new
+ replacement text is not subject to further replacements
+es5id: 15.5.4.11_A2_T9
+description: Use $` in replaceValue, searchValue is regular expression /sh/
+---*/
+
+var __str = 'She sells seashells by the seashore.';
+var __re = /sh/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$`" + 'sch')!=='She sells seaShe sells seaschells by the seashore.') {
+ $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/; __str.replace(__re, "$`" + \'sch\')===\'She sells seaShe sells seaschells by the seashore.\'. Actual: '+__str.replace(__re, "$`" + 'sch'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js
new file mode 100644
index 000000000..07cc9cc72
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /(uid=)(\d+)/ returns
+es5id: 15.5.4.11_A3_T1
+description: replaceValue is "$11" + 15
+---*/
+
+var __str = 'uid=31';
+var __re = /(uid=)(\d+)/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$11" + 15)!=='uid=115') {
+ $ERROR('#1: var __str = \'uid=31\'; var __re = /(uid=)(\d+)/; __str.replace(__re, "$11" + 15)===\'uid=115\'. Actual: '+__str.replace(__re, "$11" + 15));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js
new file mode 100644
index 000000000..103dc9ec3
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /(uid=)(\d+)/ returns
+es5id: 15.5.4.11_A3_T2
+description: replaceValue is "$11" + '15'
+---*/
+
+var __str = 'uid=31';
+var __re = /(uid=)(\d+)/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$11" + '15')!=='uid=115') {
+ $ERROR('#1: var __str = \'uid=31\'; var __re = /(uid=)(\d+)/; __str.replace(__re, "$11" + \'15\')===\'uid=115\'. Actual: '+__str.replace(__re, "$11" + '15'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js
new file mode 100644
index 000000000..3b1a30458
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /(uid=)(\d+)/ returns
+es5id: 15.5.4.11_A3_T3
+description: replaceValue is "$11" + 'A15'
+---*/
+
+var __str = 'uid=31';
+var __re = /(uid=)(\d+)/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__re, "$11" + 'A15')!=='uid=1A15' ) {
+ $ERROR('#1: var __str = \'uid=31\'; var __re = /(uid=)(\d+)/; __str.replace(__re, "$11" + \'A15\')===\'uid=1A15\' . Actual: '+__str.replace(__re, "$11" + 'A15'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T1.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T1.js
new file mode 100644
index 000000000..e695fe572
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T1.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns
+es5id: 15.5.4.11_A4_T1
+description: searchValue is /([a-z]+)([0-9]+)/
+---*/
+
+var __str = "abc12 def34";
+var __pattern = /([a-z]+)([0-9]+)/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__pattern, __replFN)!=='12abc def34') {
+ $ERROR('#1: var __str = "abc12 def34"; var __pattern = /([a-z]+)([0-9]+)/; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\'12abc def34\'. Actual: '+__str.replace(__pattern, __replFN));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __replFN() {
+ return arguments[2] + arguments[1];
+}
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T2.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T2.js
new file mode 100644
index 000000000..141966c06
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T2.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns
+es5id: 15.5.4.11_A4_T2
+description: searchValue is /([a-z]+)([0-9]+)/g
+---*/
+
+var __str = "abc12 def34";
+var __pattern = /([a-z]+)([0-9]+)/g;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__pattern, __replFN)!=='12abc 34def') {
+ $ERROR('#1: var __str = "abc12 def34"; var __pattern = /([a-z]+)([0-9]+)/g; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\'12abc 34def\'. Actual: '+__str.replace(__pattern, __replFN));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __replFN() {
+ return arguments[2] + arguments[1];
+}
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T3.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T3.js
new file mode 100644
index 000000000..fcd736f85
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T3.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns
+es5id: 15.5.4.11_A4_T3
+description: searchValue is /([a-z]+)([0-9]+)/i
+---*/
+
+var __str = "aBc12 def34";
+var __pattern = /([a-z]+)([0-9]+)/i;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__pattern, __replFN)!=='12aBc def34') {
+ $ERROR('#1: var __str = "aBc12 def34"; var __pattern = /([a-z]+)([0-9]+)/i; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\'12aBc def34\'. Actual: '+__str.replace(__pattern, __replFN));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __replFN() {
+ return arguments[2] + arguments[1];
+}
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T4.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T4.js
new file mode 100644
index 000000000..b272fa8d7
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A4_T4.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns
+es5id: 15.5.4.11_A4_T4
+description: searchValue is /([a-z]+)([0-9]+)/ig
+---*/
+
+var __str = "aBc12 dEf34";
+var __pattern = /([a-z]+)([0-9]+)/ig;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__pattern, __replFN)!=='12aBc 34dEf') {
+ $ERROR('#1: var __str = "aBc12 dEf34"; var __pattern = /([a-z]+)([0-9]+)/ig; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\'12aBc 34dEf\'. Actual: '+__str.replace(__pattern, __replFN));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __replFN() {
+ return arguments[2] + arguments[1];
+}
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A5_T1.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A5_T1.js
new file mode 100644
index 000000000..92d05069e
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A5_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Use replace with regexp as searchValue and use $ in replaceValue
+es5id: 15.5.4.11_A5_T1
+description: searchValue is regexp /^(a+)\1*,\1+$/ and replaceValue is "$1"
+---*/
+
+var __str = "aaaaaaaaaa,aaaaaaaaaaaaaaa";
+var __pattern = /^(a+)\1*,\1+$/;
+var __repl = "$1";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str.replace(__pattern, __repl)!=='aaaaa') {
+ $ERROR('#1: var __str = "aaaaaaaaaa,aaaaaaaaaaaaaaa"; var __pattern = /^(a+)\1*,\1+$/; var __repl = "$1"; __str.replace(__pattern, __repl)===\'aaaaa\'. Actual: '+__str.replace(__pattern, __repl));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A6.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A6.js
new file mode 100644
index 000000000..5ba2416ab
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace has not prototype property
+es5id: 15.5.4.11_A6
+description: Checking String.prototype.replace.prototype;
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.replace.prototype !== undefined) {
+ $ERROR('#1: String.prototype.replace.prototype === undefined. Actual: '+String.prototype.replace.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A7.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A7.js
new file mode 100644
index 000000000..db7214356
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.replace can't be used as constructor
+es5id: 15.5.4.11_A7
+description: Checking if creating the String.prototype.replace object fails
+includes:
+ - $FAIL.js
+ - Test262Error.js
+---*/
+
+var __FACTORY = String.prototype.replace;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.replace; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js
new file mode 100644
index 000000000..af441ca3c
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.replace.length property has the attribute DontEnum
+es5id: 15.5.4.11_A8
+description: >
+ Checking if enumerating the String.prototype.replace.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.replace.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.replace.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.replace.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.replace.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+count=0;
+
+for (p in String.prototype.replace){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.replace){if (p==="length") count++;} count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A9.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A9.js
new file mode 100644
index 000000000..c116d554a
--- /dev/null
+++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.replace.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.11_A9
+description: >
+ Checking if deleting the String.prototype.replace.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.replace.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.replace.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.replace.length) {
+ $ERROR('#1: delete String.prototype.replace.length return true!');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.replace.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.replace.length; String.prototype.replace.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.replace.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1.1_T1.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1.1_T1.js
new file mode 100644
index 000000000..84f5ca9d1
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1.1_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.search (regexp) without arguments behaves like with
+ argument "undefined"
+es5id: 15.5.4.12_A1.1_T1
+description: Call search() is the same search(undefined)
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+var x = "".search();
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A10.js b/test/built-ins/String/prototype/search/S15.5.4.12_A10.js
new file mode 100644
index 000000000..b2dd99202
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.search.length property has the attribute ReadOnly
+es5id: 15.5.4.12_A10
+description: >
+ Checking if varying the String.prototype.search.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.search.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.search.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.search.length;
+
+String.prototype.search.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.search.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.search.length; String.prototype.search.length = function(){return "shifted";}; String.prototype.search.length === __obj. Actual: '+String.prototype.search.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A11.js b/test/built-ins/String/prototype/search/S15.5.4.12_A11.js
new file mode 100644
index 000000000..3e71c196d
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the search method is 1
+es5id: 15.5.4.12_A11
+description: Checking String.prototype.search.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.search.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.search.hasOwnProperty("length") return true. Actual: '+String.prototype.search.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.search.length !== 1) {
+ $ERROR('#2: String.prototype.search.length === 1. Actual: '+String.prototype.search.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T1.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T1.js
new file mode 100644
index 000000000..1813eaac2
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T1
+description: Argument is true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.search = String.prototype.search;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.search(true) !== 0) {
+ $ERROR('#1: __instance = new Object(true); __instance.search = String.prototype.search; __instance.search(true) === 0. Actual: '+__instance.search(true) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js
new file mode 100644
index 000000000..8aa9c6038
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T10.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T10
+description: >
+ Argument is object, and instance is string. Object with overrided
+ toString function
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}};
+var __str = "ssABB\u0041BABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (search(__obj) !==2) {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; var __str = "ssABB\u0041BABAB"; search(__obj) ===2. Actual: '+search(__obj) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js
new file mode 100644
index 000000000..186e38215
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T11.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T11
+description: >
+ Argument is object, and instance is string. Object with overrided
+ toString function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}}
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = search(__obj);
+ $FAIL('#1: var x = search(__obj) lead to throwing exception');
+ } catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js
new file mode 100644
index 000000000..6ea6becf7
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T12.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T12
+description: >
+ Argument is object, and instance is string. Object with overrided
+ toString and valueOf functions, valueOf throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = search(__obj);
+ $FAIL('#1: var x = search(__obj) lead to throwing exception');
+ } catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T13.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T13.js
new file mode 100644
index 000000000..edec536de
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T13.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T13
+description: >
+ Argument is object, and instance is string. Object with overrided
+ toString and valueOf functions
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041B\u0031ABAB\u0031BBAA".search(__obj) !==5) {
+ $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; "ABB\\u0041B\\u0031ABAB\\u0031BBAA".search(__obj) ===5. Actual: '+("ABB\u0041B\u0031ABAB\u0031BBAA".search(__obj)) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T14.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T14.js
new file mode 100644
index 000000000..a8245be47
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T14.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T14
+description: Instance is string, argument is regular expression
+---*/
+
+var __reg = new RegExp("77");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("ABB\u0041BABAB\u0037\u0037BBAA".search(__reg) !== 9) {
+ $ERROR('#1: var __reg = new RegExp("77"); "ABB\\u0041BABAB\\u0037\\u0037BBAA".search(__reg) === 9. Actual: '+("ABB\u0041BABAB\u0037\u0037BBAA".search(__reg)) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T2.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T2.js
new file mode 100644
index 000000000..61d0ec886
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T2
+description: Argument is function call, and instance is Boolean
+---*/
+
+var __instance = new Boolean;
+
+__instance.search = String.prototype.search;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.search(function(){return false;}()) !== 0) {
+ $ERROR('#1: __instance = new Boolean; __instance.search = String.prototype.search; __instance.search(function(){return false;}()) === 0. Actual: '+__instance.search(function(){return false;}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T4.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T4.js
new file mode 100644
index 000000000..c3e0aa669
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T4.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T4
+description: Call search (regexp) without arguments
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString() evaluates to "" search() evaluates to search("")
+if ("".search() !== 0) {
+ $ERROR('#1: "".search() === 0. Actual: '+("".search()) );
+}
+
+if ("--undefined--".search() != 0) {
+ $ERROR('#1: "--undefined--".search() === 0. Actual: '+("--undefined--".search()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T5.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T5.js
new file mode 100644
index 000000000..a1407792f
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T5
+description: Argument is null, and instance is function call, that return string
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" search(null) evaluates to search("null")
+if (function(){return "gnulluna"}().search(null) !== 1) {
+ $ERROR('#1: function(){return "gnulluna"}().search(null) === 1. Actual: '+function(){return "gnulluna"}().search(null) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T6.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T6.js
new file mode 100644
index 000000000..074d2d68f
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T6.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T6
+description: Argument is x, and instance is new String, x is undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" search(undefined) evaluates to search("undefined")
+if (new String("undefined").search(x) !== 0) {
+ $ERROR('#1: var x; new String("undefined").search(x) === 0. Actual: '+new String("undefined").search(x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T7.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T7.js
new file mode 100644
index 000000000..dc79e77e2
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T7.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T7
+description: Argument is undefined, and instance is new String
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" search(undefined) evaluates to search("undefined")
+if (String("undefined").search(undefined) !== 0) {
+ $ERROR('#1: String("undefined").search(undefined) === 0. Actual: '+String("undefined").search(undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T8.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T8.js
new file mode 100644
index 000000000..9686f918f
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T8.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T8
+description: >
+ Argument is void 0, and instance is String object with overrided
+ toString function
+---*/
+
+var __obj = {toString:function(){}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(void 0) evaluates to "undefined" search(void 0) evaluates to search("undefined")
+if (String(__obj).search(void 0) !== 0) {
+ $ERROR('#1: __obj = {toString:function(){}}; String(__obj).search(void 0) === 0. Actual: '+String(__obj).search(void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A1_T9.js b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T9.js
new file mode 100644
index 000000000..d94e1307f
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A1_T9.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp)
+es5id: 15.5.4.12_A1_T9
+description: >
+ Argument is function call, and instance is String object with
+ overrided toString and valueOf functions
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "undefined" search(undefined) evaluates to search("undefined")
+if (new String(__obj).search(function(){}()) !== 0) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).search(function(){}()) === 0. Actual: '+new String(__obj).search(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T1.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T1.js
new file mode 100644
index 000000000..67cd389fc
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T1
+description: Simple search substring inside string
+---*/
+
+var aString = new String("test string");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search("string")!== 5) {
+ $ERROR('#1: var aString = new String("test string"); aString.search("string")=== 5. Actual: '+aString.search("string"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T2.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T2.js
new file mode 100644
index 000000000..31a6f4123
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T2
+description: Checking case sensitive of search, argument is string
+---*/
+
+var aString = new String("test string");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search("String")!== -1) {
+ $ERROR('#1: var aString = new String("test string"); aString.search("String")=== -1. Actual: '+aString.search("String"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T3.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T3.js
new file mode 100644
index 000000000..221a60249
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T3.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T3
+description: Checking disabling of case sensitive of search, argument is RegExp
+---*/
+
+var aString = new String("test string");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search(/String/i)!== 5) {
+ $ERROR('#1: var aString = new String("test string"); aString.search(/String/i)=== 5. Actual: '+aString.search(/String/i));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T4.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T4.js
new file mode 100644
index 000000000..2edc13e4a
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T4.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T4
+description: >
+ Checking case sensitive of search, argument is RegExp with
+ uppercase symbols
+---*/
+
+var bString = new String("one two three four five");
+var regExp = /Four/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (bString.search(regExp)!== -1) {
+ $ERROR('#1: var bString = new String("one two three four five"); var regExp = /Four/; bString.search(regExp)=== -1. Actual: '+bString.search(regExp));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T5.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T5.js
new file mode 100644
index 000000000..40b750cc8
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T5.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T5
+description: >
+ Checking case sensitive of search, argument is RegExp without
+ uppercase symbols
+---*/
+
+var bString = new String("one two three four five");
+var regExp = /four/;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (bString.search(regExp)!== 14) {
+ $ERROR('#1: var bString = new String("one two three four five"); var regExp = /four/; bString.search(regExp)=== 14. Actual: '+bString.search(regExp));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T6.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T6.js
new file mode 100644
index 000000000..b6787c22c
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T6
+description: Searching the non-existent "notexist" substring
+---*/
+
+var aString = new String("test string");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search("notexist")!== -1) {
+ $ERROR('#1: var aString = new String("test string"); aString.search("notexist")=== -1. Actual: '+aString.search("notexist"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A2_T7.js b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T7.js
new file mode 100644
index 000000000..4dad5ae95
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A2_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) returns ...
+es5id: 15.5.4.12_A2_T7
+description: Simple search sentence inside string
+---*/
+
+var aString = new String("test string probe");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search("string pro")!== 5) {
+ $ERROR('#1: var aString = new String("test string probe"); aString.search("string pro")=== 5. Actual: '+aString.search("string pro"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A3_T1.js b/test/built-ins/String/prototype/search/S15.5.4.12_A3_T1.js
new file mode 100644
index 000000000..1481639f7
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A3_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) ignores global properties of regexp
+es5id: 15.5.4.12_A3_T1
+description: >
+ Checking results of search regexp with and without global
+ properties
+---*/
+
+var aString = new String("power of the power of the power of the power of the power of the power of the great sword");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search(/the/)!== aString.search(/the/g)) {
+ $ERROR('#1: var aString = new String("power of the power of the power of the power of the power of the power of the great sword"); aString.search(/the/)=== aString.search(/the/g). Actual: '+aString.search(/the/));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A3_T2.js b/test/built-ins/String/prototype/search/S15.5.4.12_A3_T2.js
new file mode 100644
index 000000000..099e69e6f
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A3_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search (regexp) ignores global properties of regexp
+es5id: 15.5.4.12_A3_T2
+description: >
+ Checking results of search regexp with and without global
+ properties. Unicode symbols used
+---*/
+
+var aString = new String("power \u006F\u0066 the power of the power \u006F\u0066 the power of the power \u006F\u0066 the power of the great sword");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (aString.search(/of/)!== aString.search(/of/g)) {
+ $ERROR('#1: var aString = new String("power \\u006F\\u0066 the power of the power \\u006F\\u0066 the power of the power \\u006F\\u0066 the power of the great sword"); aString.search(/of/)=== aString.search(/of/g). Actual: '+aString.search(/of/));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A6.js b/test/built-ins/String/prototype/search/S15.5.4.12_A6.js
new file mode 100644
index 000000000..7b56f3270
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search has not prototype property
+es5id: 15.5.4.12_A6
+description: Checking String.prototype.search.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.search.prototype !== undefined) {
+ $ERROR('#1: String.prototype.search.prototype === undefined. Actual: '+String.prototype.search.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A7.js b/test/built-ins/String/prototype/search/S15.5.4.12_A7.js
new file mode 100644
index 000000000..9a7faef37
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A7.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.search can't be used as constructor
+es5id: 15.5.4.12_A7
+description: Checking if creating the String.prototype.search object fails
+includes:
+ - $PRINT.js
+ - $FAIL.js
+---*/
+
+var __FACTORY = String.prototype.search;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.search; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.1: __FACTORY = String.prototype.search; "__instance = new __FACTORY" throw a TypeError. Actual: ' + (e));
+ }
+ $PRINT(e);
+}
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A8.js b/test/built-ins/String/prototype/search/S15.5.4.12_A8.js
new file mode 100644
index 000000000..bcaeddbc7
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.search.length property has the attribute DontEnum
+es5id: 15.5.4.12_A8
+description: >
+ Checking if enumerating the String.prototype.search.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.search.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.search.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.search.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.search.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.search){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.search){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A9.js b/test/built-ins/String/prototype/search/S15.5.4.12_A9.js
new file mode 100644
index 000000000..90bb0c1fd
--- /dev/null
+++ b/test/built-ins/String/prototype/search/S15.5.4.12_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.search.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.12_A9
+description: >
+ Checking if deleting the String.prototype.search.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.search.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.search.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.search.length) {
+ $ERROR('#1: delete String.prototype.search.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.search.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.search.length; String.prototype.search.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.search.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js
new file mode 100644
index 000000000..39e1be96f
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.slice.length property has the attribute ReadOnly
+es5id: 15.5.4.13_A10
+description: >
+ Checking if varying the String.prototype.slice.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.slice.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.slice.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.slice.length;
+
+String.prototype.slice.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.slice.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.slice.length; String.prototype.slice.length = function(){return "shifted";}; String.prototype.slice.length === __obj. Actual: '+String.prototype.slice.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A11.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A11.js
new file mode 100644
index 000000000..df758f408
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the slice method is 2
+es5id: 15.5.4.13_A11
+description: Checking String.prototype.slice.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.slice.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.slice.hasOwnProperty("length") return true. Actual: '+String.prototype.slice.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.slice.length !== 2) {
+ $ERROR('#2: String.prototype.slice.length === 2. Actual: '+String.prototype.slice.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T1.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T1.js
new file mode 100644
index 000000000..5158fdf5b
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T1
+description: Arguments are false and true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.slice = String.prototype.slice;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.slice(false, true) !== "t") {
+ $ERROR('#1: __instance = new Object(true); __instance.slice = String.prototype.slice; __instance.slice(false, true) === "t". Actual: '+__instance.slice(false, true) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js
new file mode 100644
index 000000000..3697d188d
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T10.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T10
+description: >
+ Arguments are object and function call, and instance is String,
+ object have overrided valueOf function
+---*/
+
+var __obj = {valueOf:function(){return 2;}};
+
+var __str = "\u0035ABBBABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (slice(__obj, function(){return slice(0,1);}()) !== "BBB") {
+ $ERROR('#1: var x; var __obj = {valueOf:function(){return 2;}}; var __str = "\u0035ABBBABAB"; slice(__obj, function(){return slice(0,1);}()) === "BBB". Actual: '+slice(__obj, function(){return slice(0,1);}()) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js
new file mode 100644
index 000000000..b63f85f0a
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T11.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T11
+description: >
+ Arguments are objects, and instance is string, objects have
+ overrided valueOf function, that return exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {valueOf:function(){throw "instart";}};
+var __obj2 = {valueOf:function(){throw "inend";}};
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = slice(__obj,__obj2);
+ $FAIL('#1: "var x = slice(__obj,__obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="instart") {
+ $ERROR('#1.1: Exception === "instart". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js
new file mode 100644
index 000000000..00339123a
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T12.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T12
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided valueOf function and toString function, that return
+ exception. Second object have overrided valueOf function, that
+ return exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {valueOf:function(){return {};}, toString:function(){throw "instart";}};
+var __obj2 = {valueOf:function(){throw "inend";}};
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = slice(__obj, __obj2);
+ $FAIL('#1: "var x = slice(__obj,__obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="instart") {
+ $ERROR('#1.1: Exception === "instart". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T13.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T13.js
new file mode 100644
index 000000000..1a53b741c
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T13.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T13
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided valueOf and toString functions. Second object have
+ overrided toString function, that return exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {valueOf:function(){return {};}, toString:function(){return 1;}};
+var __obj2 = {toString:function(){throw "inend";}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = "ABB\u0041BABAB\u0031BBAA".slice(__obj, __obj2);
+ $FAIL('#1: "var x = slice(__obj,__obj2)" lead to throwing exception');
+} catch (e) {
+ if (e!=="inend") {
+ $ERROR('#1.1: Exception === "inend". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T14.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T14.js
new file mode 100644
index 000000000..d7b718ac8
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T14.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T14
+description: Used one argument, that is function(){}(). Instance is string
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("report".slice(function(){}()) !== "report") {
+ $ERROR('#1: "report".slice(function(){}()) === "report". Actual: '+"report".slice(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T15.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T15.js
new file mode 100644
index 000000000..b7017e4db
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T15.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T15
+description: >
+ Call slice without arguments. Instance is Number with
+ prototype.slice = String.prototype.slice
+---*/
+
+var __num = 11.001002;
+
+Number.prototype.slice = String.prototype.slice;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__num.slice()!=="11.001002") {
+ $ERROR('#1: var __num = 11.001002; Number.prototype.slice = String.prototype.slice; __num.slice()==="11.001002". Actual: '+__num.slice());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T2.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T2.js
new file mode 100644
index 000000000..dd945f581
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T2.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T2
+description: >
+ Arguments are function call and x, and instance is Boolean. x is
+ undefined variable
+---*/
+
+var __instance = new Boolean;
+
+__instance.slice = String.prototype.slice;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.slice(function(){return true;}(),x) !== "alse") {
+ $ERROR('#1: var x; __instance = new Boolean; __instance.slice = String.prototype.slice; __instance.slice(function(){return true;}(),x) === "alse". Actual: '+__instance.slice(function(){return true;}(),x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T4.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T4.js
new file mode 100644
index 000000000..1fda0a114
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T4.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T4
+description: >
+ Arguments are null and number, and instance is function call, that
+ returned string
+---*/
+
+//since ToInteger(null) yelds 0
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (function(){return "gnulluna"}().slice(null, -3) !== "gnull") {
+ $ERROR('#1: function(){return "gnulluna"}().slice(null, -3) === "gnull". Actual: '+function(){return "gnulluna"}().slice(null, -3) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T5.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T5.js
new file mode 100644
index 000000000..d75481ec2
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T5.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T5
+description: >
+ Arguments are null and call other slice(start, end), and instance
+ is function object, that have overrided valueOf and toString
+ functions
+---*/
+
+__func.valueOf=function(){return "gnulluna"};
+__func.toString=function(){return __func;};
+
+Function.prototype.slice=String.prototype.slice;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__func.slice(null, Function().slice(__func,5).length) !== "gnull") {
+ $ERROR('#1: __func.slice(null, Function().slice(__func,5).length) === "gnull". Actual: '+__func.slice(null, Function().slice(__func,5).length) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __func(){};
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T6.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T6.js
new file mode 100644
index 000000000..38aa85042
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T6.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T6
+description: >
+ Arguments are x and number, and instance is new String, x is
+ undefined variable
+---*/
+
+//since ToInteger(undefined yelds 0)
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (new String("undefined").slice(x,3) !== "und") {
+ $ERROR('#1: var x; new String("undefined").slice(x,3) === "und". Actual: '+new String("undefined").slice(x,3) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T7.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T7.js
new file mode 100644
index 000000000..3926ea9df
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T7.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T7
+description: Arguments are symbol and undefined, and instance is String
+---*/
+
+//since ToInteger("e") yelds 0
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String(void 0).slice("e",undefined) !== "undefined") {
+ $ERROR('#1: String(void 0).slice("e",undefined) === "undefined". Actual: '+String(void 0).slice("e",undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js
new file mode 100644
index 000000000..89a92a220
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T8.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T8
+description: >
+ Arguments are negative number and void 0, and instance is
+ String(object), object have overrided toString function
+---*/
+
+__obj = {toString:function(){}};
+
+//since void 0 yelds 0
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String(__obj).slice(-4,void 0) !== "ined") {
+ $ERROR('#1: __obj = {toString:function(){}}; String(__obj).slice(-4,void 0) === "ined". Actual: '+String(__obj).slice(-4,void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T9.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T9.js
new file mode 100644
index 000000000..9c927f1f2
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A1_T9.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end)
+es5id: 15.5.4.13_A1_T9
+description: >
+ Arguments are undefined and object, and instance is
+ String(object), object have overrided valueOf and toString
+ functions
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//since ToInteger(undefined) yelds 0
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (new String(__obj).slice(/*(function(){})()*/undefined,__obj) !== "") {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).slice(//*(function(){})()*//undefined,__obj) === "". Actual: '+new String(__obj).slice(/*(function(){})()*/undefined,__obj) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T1.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T1.js
new file mode 100644
index 000000000..88790f7e7
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T1
+description: Checking type of slice()
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __string.slice() !== "string") {
+ $ERROR('#1: __string = new String("this is a string object"); typeof __string.slice() === "string". Actual: '+typeof __string.slice() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T2.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T2.js
new file mode 100644
index 000000000..cadc98532
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T2
+description: start is NaN, end is Infinity
+---*/
+
+var __string = new String('this is a string object');
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(NaN, Infinity) !== "this is a string object") {
+ $ERROR('#1: __string = new String(\'this is a string object\'); __string.slice(NaN, Infinity) === "this is a string object". Actual: '+__string.slice(NaN, Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T3.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T3.js
new file mode 100644
index 000000000..2cd542d17
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T3.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T3
+description: Call slice from empty String object
+---*/
+
+var __string = new String("");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(1,0) !== "") {
+ $ERROR('#1: __string = new String(""); __string.slice(1,0) === "". Actual: '+__string.slice(1,0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T4.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T4.js
new file mode 100644
index 000000000..db80ad757
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T4.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T4
+description: start is Infinity, end is NaN
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(Infinity, NaN) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.slice(Infinity, NaN) === "". Actual: '+__string.slice(Infinity, NaN) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T5.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T5.js
new file mode 100644
index 000000000..e889dedce
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T5.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T5
+description: start is Infinity, end is Infinity
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(Infinity, Infinity) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.slice(Infinity, Infinity) === "". Actual: '+__string.slice(Infinity, Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T6.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T6.js
new file mode 100644
index 000000000..73383aaeb
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T6
+description: start is negative float number, end is 0
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(-0.01,0) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.slice(-0.01,0) === "". Actual: '+__string.slice(-0.01,0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T7.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T7.js
new file mode 100644
index 000000000..5a6e272b3
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T7
+description: start is tested_string.length, end is tested_string.length
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(__string.length, __string.length) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.slice(__string.length, __string.length) === "". Actual: '+__string.slice(__string.length, __string.length) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T8.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T8.js
new file mode 100644
index 000000000..9559e7b75
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T8.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T8
+description: start is tested_string.length+1, end is 0
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(__string.length+1, 0) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.slice(__string.length+1, 0) === "". Actual: '+__string.slice(__string.length+1, 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T9.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T9.js
new file mode 100644
index 000000000..9b13cb8df
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A2_T9.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) returns a string value(not object)
+es5id: 15.5.4.13_A2_T9
+description: start is -Infinity, end is -Infinity
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.slice(-Infinity, -Infinity) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.slice(-Infinity, -Infinity) === "". Actual: '+__string.slice(-Infinity, -Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T1.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T1.js
new file mode 100644
index 000000000..b60a25f06
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) can be applied to object instances
+es5id: 15.5.4.13_A3_T1
+description: Apply String.prototype.slice to Object instance
+---*/
+
+var __instance = new Object();
+
+__instance.slice = String.prototype.slice;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.slice(0,8) !== "[object ") {
+ $ERROR('#1: __instance = new Object(); __instance.slice = String.prototype.slice; __instance.slice(0,8) === "[object ". Actual: '+__instance.slice(0,8) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T2.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T2.js
new file mode 100644
index 000000000..4335b1e82
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) can be applied to object instances
+es5id: 15.5.4.13_A3_T2
+description: >
+ Apply String.prototype.slice to Object instance, use other value
+ for start and end values
+---*/
+
+var __instance = new Object();
+
+__instance.slice = String.prototype.slice;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.slice(8,__instance.toString().length) !== "Object]") {
+ $ERROR('#1: __instance = new Object(); __instance.slice = String.prototype.slice; __instance.slice(8,__instance.toString().length) === "Object]". Actual: '+__instance.slice(8,__instance.toString().length) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T3.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T3.js
new file mode 100644
index 000000000..2ed9d7ff0
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T3.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) can be applied to object instances
+es5id: 15.5.4.13_A3_T3
+description: >
+ Apply String.prototype.slice to Object instance, and call
+ instance.slice(...).slice(...)
+---*/
+
+var __instance = { toString: function() { return "function(){}";} };
+
+__instance.slice = String.prototype.slice;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.slice(-Infinity,8).slice(1,Infinity) !== "unction") {
+ $ERROR('#1: __instance = function(){}; __instance.slice = String.prototype.slice; __instance.slice(-Infinity,8).slice(1,Infinity) === "unction". Actual: '+__instance.slice(-Infinity,8).slice(1,Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T4.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T4.js
new file mode 100644
index 000000000..e07c09aae
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A3_T4.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice (start, end) can be applied to object instances
+es5id: 15.5.4.13_A3_T4
+description: >
+ Checknig if applying String.prototype.slice to Function object
+ instance passes
+---*/
+
+__FACTORY.prototype.toString = function() { return this.value+''; };
+
+var __instance = new __FACTORY(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.slice(0,100) !== "undefined") {
+ $ERROR('#1: __instance.slice(0,100) === "undefined". Actual: '+__instance.slice(0,100) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __FACTORY( value ) {
+ this.value = value,
+ this.slice= String.prototype.slice;
+ //this.substring = String.prototype.substring;
+}
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A6.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A6.js
new file mode 100644
index 000000000..0e9643aa6
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice has not prototype property
+es5id: 15.5.4.13_A6
+description: Checking String.prototype.slice.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.slice.prototype !== undefined) {
+ $ERROR('#1: String.prototype.slice.prototype === undefined. Actual: '+String.prototype.slice.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A7.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A7.js
new file mode 100644
index 000000000..4f9c59679
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.slice can't be used as constructor
+es5id: 15.5.4.13_A7
+description: Checking if creating the String.prototype.slice object fails
+includes:
+ - $PRINT.js
+ - $FAIL.js
+---*/
+
+var __FACTORY = String.prototype.slice;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.slice; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ $PRINT(e);
+}
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js
new file mode 100644
index 000000000..4b644092c
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.slice.length property has the attribute DontEnum
+es5id: 15.5.4.13_A8
+description: >
+ Checking if enumerating the String.prototype.slice.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.slice.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.slice.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.slice.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.slice.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.slice){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.slice){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A9.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A9.js
new file mode 100644
index 000000000..5d12784db
--- /dev/null
+++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.slice.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.13_A9
+description: >
+ Checking if deleting the String.prototype.slice.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.slice.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.slice.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.slice.length) {
+ $ERROR('#1: delete String.prototype.slice.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.slice.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.slice.length; String.prototype.slice.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.slice.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A10.js
new file mode 100644
index 000000000..aa108fb5a
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.split.length property has the attribute ReadOnly
+es5id: 15.5.4.14_A10
+description: >
+ Checking if varying the String.prototype.split.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.split.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.split.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.split.length;
+
+String.prototype.split.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.split.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.split.length; String.prototype.split.length = function(){return "shifted";}; String.prototype.split.length === __obj. Actual: '+String.prototype.split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A11.js b/test/built-ins/String/prototype/split/S15.5.4.14_A11.js
new file mode 100644
index 000000000..b3a94684f
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the split method is 2
+es5id: 15.5.4.14_A11
+description: Checking String.prototype.split.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.split.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.split.hasOwnProperty("length") return true. Actual: '+String.prototype.split.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.split.length !== 2) {
+ $ERROR('#2: String.prototype.split.length === 2. Actual: '+String.prototype.split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T1.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T1.js
new file mode 100644
index 000000000..fc45e8c12
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T1.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T1
+description: Arguments are false and true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split(true, false);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 0) {
+ $ERROR('#3: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); __split.length === 0. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js
new file mode 100644
index 000000000..63bfb0130
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T10.js
@@ -0,0 +1,56 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T10
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided toString function. Second object have overrided valueOf
+ function
+---*/
+
+var __obj = {toString:function(){return "\u0042B";}}
+var __obj2 = {valueOf:function(){return true;}}
+var __str = "ABB\u0041BABAB";
+
+with(__str){
+ __split = split(__obj, __obj2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "A") {
+ $ERROR('#4: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; with(__str){__split = split(__obj, __obj2);}; __split[0] === "A". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js
new file mode 100644
index 000000000..c1d8648e0
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T11.js
@@ -0,0 +1,38 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T11
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided toString function. Second object have overrided valueOf
+ function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){throw "intointeger";}}
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = split(__obj, __obj2);
+ $FAIL('#1: "var x = split(__obj, __obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js
new file mode 100644
index 000000000..925be56d6
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T12.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T12
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided toString function. Second object have overrided valueOf
+ function and toString function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}}
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = split(__obj, __obj2);
+ $FAIL('#1: "var x = split(__obj, __obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T13.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T13.js
new file mode 100644
index 000000000..9ca4ef357
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T13.js
@@ -0,0 +1,61 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T13
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided toString function. Second object have overrided valueOf
+ and toString functions
+---*/
+
+var __obj = {toString:function(){return "\u0042\u0042";}}
+var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}
+
+var __split = "ABB\u0041BABAB\u0042cc^^\u0042Bvv%%B\u0042xxx".split(__obj, __obj2);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 2) {
+ $ERROR('#3: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "A") {
+ $ERROR('#4: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split[0] === "A". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[1] !== "ABABA") {
+ $ERROR('#5: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split[1] === "ABABA". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js
new file mode 100644
index 000000000..d09c6ecdd
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T14.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T14
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided toString function, that throw exception. Second object
+ have overrided valueOf function, that throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}};
+var __obj2 = {valueOf:function(){throw "intoint";}};
+var __instance = new Number(10001.10001);
+Number.prototype.split=String.prototype.split;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__instance){
+ try {
+ var x = split(__obj, __obj2);
+ $FAIL('#1: "var x = split(__obj, __obj2)" lead to throwing exception');
+ } catch (e) {
+ if (e!=="intoint") {
+ $ERROR('#1.1: Exception === "intoint". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js
new file mode 100644
index 000000000..3ea3ae8df
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T15
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided toString function and valueOf function, that throw
+ exception. Second object have overrided valueOf function, that
+ throw exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}};
+
+var __obj2 = {valueOf:function(){throw "intointeger";}};
+
+__FACTORY.prototype.split = String.prototype.split;
+
+var __instance = new __FACTORY(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __instance.split(__obj, __obj2);
+ $FAIL('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception');
+} catch (e) {
+ if (e!=="intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __FACTORY( value ) {
+ this.value = value;
+ this.toString = function() { return new Number; };
+ this.valueOf=function(){return this.value+""};
+}
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T16.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T16.js
new file mode 100644
index 000000000..db5328008
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T16.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T16
+description: >
+ Argument is object, and instance is Number. Object have overrided
+ toString function, that return regexp
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return /\u0037\u0037/g;}};
+
+Number.prototype.split=String.prototype.split;
+
+try {
+ var __split = 6776767677.006771122677555.split(__obj);
+ $FAIL('#1: "__split = 6776767677.006771122677555.split(__obj)" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e);
+ }
+}
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js
new file mode 100644
index 000000000..080f5d274
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T17.js
@@ -0,0 +1,75 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T17
+description: Argument is regexp, and instance is Number
+---*/
+
+var __re = /\u0037\u0037/g;
+
+Number.prototype.split=String.prototype.split;
+
+__split = 6776767677.006771122677555.split(__re);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 4) {
+ $ERROR('#3: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split.length === 4. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "6") {
+ $ERROR('#4: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[0] === "6". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[1] !== "67676") {
+ $ERROR('#5: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[1] === "67676". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if (__split[2] !== ".006") {
+ $ERROR('#6: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[2] === ".006". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#7
+if (__split[3] !== "1") {
+ $ERROR('#7: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[3] === "1". Actual: '+__split[3] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T18.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T18.js
new file mode 100644
index 000000000..b6b30b823
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T18.js
@@ -0,0 +1,51 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T18
+description: Checking by using eval
+---*/
+
+var __re = new RegExp("00");
+
+Number.prototype.split=String.prototype.split;
+
+var __split = 6776767677.006771122677555.split(__re, eval("\"1\""));
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "6776767677.") {
+ $ERROR('#3: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); __split[0] === "6776767677.". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T2.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T2.js
new file mode 100644
index 000000000..33818a684
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T2.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T2
+description: >
+ Arguments are boolean expression, function call and null, and
+ instance is Boolean
+---*/
+
+var __instance = new Boolean;
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split("A"!=="\u0041", function(){return 0;}(),null);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split("A"!=="u0041", function(){return 0;}(),null); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split("A"!=="u0041", function(){return 0;}(),null); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 0) {
+ $ERROR('#3: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split("A"!=="u0041", function(){return 0;}(),null); __split.length === 0. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T3.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T3.js
new file mode 100644
index 000000000..620719a49
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T3.js
@@ -0,0 +1,61 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T3
+description: Checking by using eval
+---*/
+
+var split = String.prototype.split.bind(this);
+
+var __obj__lim = {valueOf:function(){return 5;}};
+
+try {
+ toString = Object.prototype.toString;
+} catch(e) { ; }
+
+//Checks are only valid if we can overwrite the global object's toString method
+//(which ES5 doesn't even require to exist)
+if (toString===Object.prototype.toString) {
+ var __class__ = toString();
+
+ var __split = split(eval("\"[\""),__obj__lim);
+
+ //////////////////////////////////////////////////////////////////////////////
+ //CHECK#1
+ if (typeof __split !== "object") {
+ $ERROR('#1: typeof __split === "object". Actual: '+typeof __split );
+ }
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ //////////////////////////////////////////////////////////////////////////////
+ //CHECK#2
+ if (__split.constructor !== Array) {
+ $ERROR('#2: __split.constructor === Array. Actual: '+__split.constructor );
+ }
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ //////////////////////////////////////////////////////////////////////////////
+ //CHECK#3
+ if (__split.length !== 2) {
+ $ERROR('#3: __split.length === 2. Actual: '+__split.length );
+ }
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ //////////////////////////////////////////////////////////////////////////////
+ //CHECK#3
+ if (__split[1].substring(0,6) !== "object") {
+ $ERROR('#4: __split[1].substring(0,6) === "object". Actual: '+__split[1].substring(0,6) );
+ }
+ //
+ //////////////////////////////////////////////////////////////////////////////
+}
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T4.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T4.js
new file mode 100644
index 000000000..01863b0ea
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T4.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T4
+description: Call split without arguments, and instance is empty string
+---*/
+
+//since ToString() evaluates to "" split() evaluates to split("",0)
+var __split = "".split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __split = "".split(); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __split = "".split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: __split = "".split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "") {
+ $ERROR('#4: __split = "".split(); __split[0] === "". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T5.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T5.js
new file mode 100644
index 000000000..6d8b15f3e
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T5.js
@@ -0,0 +1,58 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T5
+description: >
+ Argument is null, and instance is function call that returned
+ string
+---*/
+
+//since ToString(null) evaluates to "null" split(null) evaluates to split("null",0)
+var __split = function(){return "gnulluna"}().split(null);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __split = function(){return "gnulluna"}().split(null); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __split = function(){return "gnulluna"}().split(null); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 2) {
+ $ERROR('#3: __split = function(){return "gnulluna"}().split(null); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "g") {
+ $ERROR('#4: __split = function(){return "gnulluna"}().split(null); __split[0] === "g". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[1] !== "una") {
+ $ERROR('#5: __split = function(){return "gnulluna"}().split(null); __split[1] === "una". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T6.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T6.js
new file mode 100644
index 000000000..101234fdd
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T6.js
@@ -0,0 +1,50 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T6
+description: Argument is x, and instance is new String. x is undefined variable
+---*/
+
+//since ToString(undefined) evaluates to "" split(undefined) evaluates to split("",0)
+var __split = new String("1undefined").split(x);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: var x; __split = new String("1undefined").split(x); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: var x; __split = new String("1undefined").split(x); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: var x; __split = new String("1undefined").split(x); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "1undefined") {
+ $ERROR('#4: var x; __split = new String("1undefined").split(x); __split[0] === "1undefined". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T7.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T7.js
new file mode 100644
index 000000000..8ce777f68
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T7.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T7
+description: Argument is undefined, and instance is String
+---*/
+
+var __split = String("undefinedd").split(undefined);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __split = String("undefinedd").split(undefined); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __split = String("undefinedd").split(undefined); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: __split = String("undefinedd").split(undefined); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "undefinedd") {
+ $ERROR('#4: __split = String("undefinedd").split(undefined); __split[0] === "undefinedd". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T8.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T8.js
new file mode 100644
index 000000000..79f9ad96a
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T8.js
@@ -0,0 +1,51 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T8
+description: >
+ Argument is void 0, and instance is String(object), object have
+ overrided toString function
+---*/
+
+var __obj = {toString:function(){}};
+
+var __split = String(__obj).split(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "undefined") {
+ $ERROR('#4: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split[0] !== "undefined". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A1_T9.js b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T9.js
new file mode 100644
index 000000000..108a15f47
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A1_T9.js
@@ -0,0 +1,55 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split(separator, limit):
+ i) can be transferred to other kinds of objects for use as a method.
+ separator and limit can be any kinds of object since:
+ ii) if separator is not RegExp ToString(separator) performs and
+ iii) ToInteger(limit) performs
+es5id: 15.5.4.14_A1_T9
+description: >
+ Argument is function(){}(), and instance is String(object), object
+ have overrided toString and valueOf functions
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//since ToString(undefined) evaluates to "undefined"
+var __split = new String(__obj).split(function(){}());
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __split !== "object") {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); typeof __split === "object". Actual: '+typeof __split );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.constructor !== Array) {
+ $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split.length !== 1) {
+ $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[0] !== "undefined") {
+ $ERROR('#4: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split[0] !== "undefined". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T1.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T1.js
new file mode 100644
index 000000000..32f1cae9d
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T1.js
@@ -0,0 +1,72 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T1
+description: Call split(","), instance is String("one,two,three,four,five")
+---*/
+
+var __string = new String("one,two,three,four,five");
+
+var __split = __string.split(",");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 5) {
+ $ERROR('#2: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split.length === 5. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one") {
+ $ERROR('#3: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[0] === "one". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "two") {
+ $ERROR('#4: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[1] === "two". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "three") {
+ $ERROR('#5: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[2] === "three". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if (__split[3] !== "four") {
+ $ERROR('#6: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[3] === "four". Actual: '+__split[3] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#7
+if (__split[4] !== "five") {
+ $ERROR('#7: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[4] === "five". Actual: '+__split[4] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..2db97ad79
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T10.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T10
+description: Call split(123), instance is "this123is123a123string123object"
+---*/
+
+var __string = "this123is123a123string123object";
+var __expected = ["this", "is", "a", "string", "object"];
+
+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 );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//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 );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//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]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T11.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T11.js
new file mode 100644
index 000000000..ec3f6b377
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T11.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T11
+description: "Call split(\":\"), instance is String(\"one-1,two-2,four-4\")"
+---*/
+
+var __string = new String("one-1,two-2,four-4");
+
+var __split = __string.split(":");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1,two-2,four-4"); __split = __string.split(":"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("one-1,two-2,four-4"); __split = __string.split(":"); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one-1,two-2,four-4") {
+ $ERROR('#3: var __string = new String("one-1,two-2,four-4"); __split = __string.split(":"); __split[0] === "one-1,two-2,four-4". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T12.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T12.js
new file mode 100644
index 000000000..e2b288425
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T12.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T12
+description: Call split("r-42"), instance is String("one-1 two-2 four-4")
+---*/
+
+var __string = new String("one-1 two-2 four-4");
+
+var __split = __string.split("r-42");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1 two-2 four-4"); __split = __string.split("r-42"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("one-1 two-2 four-4"); __split = __string.split("r-42"); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one-1 two-2 four-4") {
+ $ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("r-42"); __split[0] === "one-1 two-2 four-4". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T13.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T13.js
new file mode 100644
index 000000000..cb171542f
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T13.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T13
+description: Call split("-4"), instance is String("one-1 two-2 four-4")
+---*/
+
+var __string = new String("one-1 two-2 four-4");
+
+var __split = __string.split("-4");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one-1 two-2 four") {
+ $ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split[0] === "one-1 two-2 four". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split[1] === "". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T14.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T14.js
new file mode 100644
index 000000000..7f4e2befe
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T14.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T14
+description: Call split("on"), instance is String("one-1 two-2 four-4")
+---*/
+
+var __string = new String("one-1 two-2 four-4");
+
+var __split = __string.split("on");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split[0] === "". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "e-1 two-2 four-4") {
+ $ERROR('#4: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split[1] === "e-1 two-2 four-4". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T15.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T15.js
new file mode 100644
index 000000000..9c458b763
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T15.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T15
+description: Call split(""), instance is empty String object
+---*/
+
+var __string = new String();
+
+var __split = __string.split("");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String(); __split = __string.split(""); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 0) {
+ $ERROR('#2: var __string = new String(); __split = __string.split(""); __split.length === 0. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== undefined) {
+ $ERROR('#3: var __string = new String(); __split = __string.split(""); __split[0] === undefined. Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T16.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T16.js
new file mode 100644
index 000000000..60ed945b3
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T16.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T16
+description: Call split(" "), instance is empty String object
+---*/
+
+var __string = new String();
+
+var __split = __string.split(" ");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String(); __split = __string.split(" "); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String(); __split = __string.split(" "); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = new String(); __split = __string.split(" "); __split[0] === "". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T17.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T17.js
new file mode 100644
index 000000000..ba54594a2
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T17.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T17
+description: Call split(""), instance is String(" ")
+---*/
+
+var __string = new String(" ");
+
+var __split = __string.split("");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String(" "); __split = __string.split(""); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String(" "); __split = __string.split(""); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== " ") {
+ $ERROR('#3: var __string = new String(" "); __split = __string.split(""); __split[0] === " ". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T18.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T18.js
new file mode 100644
index 000000000..b693276ea
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T18.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T18
+description: Call split(" "), instance is String(" ")
+---*/
+
+var __string = new String(" ");
+
+var __split = __string.split(" ");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String(" "); __split = __string.split(" "); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String(" "); __split = __string.split(" "); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = new String(" "); __split = __string.split(" "); __split[0] === "". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String(" "); __split = __string.split(" "); __split[1] === "". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T19.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T19.js
new file mode 100644
index 000000000..a97ba4e18
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T19.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T19
+description: Call split("x"), instance is empty string
+---*/
+
+var __string = "";
+
+var __split = __string.split("x");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = ""; __split = __string.split("x"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = ""; __split = __string.split("x"); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = ""; __split = __string.split("x"); __split[0] === "". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T2.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T2.js
new file mode 100644
index 000000000..2b3b4e4d4
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T2.js
@@ -0,0 +1,72 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T2
+description: Call split(" "), instance is String("one two three four five")
+---*/
+
+var __string = new String("one two three four five");
+
+var __split = __string.split(" ");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one two three four five"); __split = __string.split(" "); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 5) {
+ $ERROR('#2: var __string = new String("one two three four five"); __split = __string.split(" "); __split.length === 5. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one") {
+ $ERROR('#3: var __string = new String("one two three four five"); __split = __string.split(" "); __split[0] === "one". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "two") {
+ $ERROR('#4: var __string = new String("one two three four five"); __split = __string.split(" "); __split[1] === "two". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "three") {
+ $ERROR('#5: var __string = new String("one two three four five"); __split = __string.split(" "); __split[2] === "three". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if (__split[3] !== "four") {
+ $ERROR('#6: var __string = new String("one two three four five"); __split = __string.split(" "); __split[3] === "four". Actual: '+__split[3] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#7
+if (__split[4] !== "five") {
+ $ERROR('#7: var __string = new String("one two three four five"); __split = __string.split(" "); __split[4] === "five". Actual: '+__split[4] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T20.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T20.js
new file mode 100644
index 000000000..682f749fb
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T20.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T20
+description: Call split(new RegExp)
+---*/
+
+var __string = new String("one-1 two-2 three-3");
+
+var __split = __string.split(new RegExp);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1 two-2 three-3"); __split = __string.split(new RegExp); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __string.length) {
+ $ERROR('#2: var __string = new String("one-1 two-2 three-3"); __split = __string.split(new RegExp); __split.length === __string.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for ( var i = 0; i < __string.length; i++ ) {
+ if (__string.charAt(i)!==__split[i]) {
+ $ERROR('#3.'+i+': var __string = new String("one-1 two-2 three-3"); __split = __string.split(new RegExp); __string.charAt('+i+')===__split['+i+']. Actual: '+__string.charAt(i));
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T21.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T21.js
new file mode 100644
index 000000000..5833f1342
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T21.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T21
+description: Call split("ll"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("ll");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("ll"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("ll"); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("ll"); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "o") {
+ $ERROR('#4: var __string = new String("hello"); __split = __string.split("ll"); __split[1] === "o". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T22.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T22.js
new file mode 100644
index 000000000..b13374a1d
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T22.js
@@ -0,0 +1,56 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T22
+description: Call split("l"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("l");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("l"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("l"); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("l"); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); __split = __string.split("l"); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "o") {
+ $ERROR('#5: var __string = new String("hello"); __split = __string.split("l"); __split[2] === "o". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T23.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T23.js
new file mode 100644
index 000000000..1fcb90faa
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T23.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T23
+description: Call split("x"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("x");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("x"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("x"); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "hello") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("x"); __split[0] === "hello". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T24.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T24.js
new file mode 100644
index 000000000..6fb5265f0
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T24.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T24
+description: Call split("h"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("h");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("h"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("h"); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("h"); __split[0] === "". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "ello") {
+ $ERROR('#4: var __string = new String("hello"); __split = __string.split("h"); __split[1] === "ello". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T25.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T25.js
new file mode 100644
index 000000000..59de55125
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T25.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T25
+description: Call split("o"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("o");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("o"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("o"); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "hell") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("o"); __split[0] === "hell". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); __split = __string.split("o"); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T26.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T26.js
new file mode 100644
index 000000000..fe042de4c
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T26.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T26
+description: Call split("hello"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("hello");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("hello"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("hello"); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("hello"); __split[0] === "". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); __split = __string.split("hello"); __split[1] === "". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T27.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T27.js
new file mode 100644
index 000000000..651ac887c
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T27.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T27
+description: Call split(undefined), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split(undefined);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split(undefined); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split(undefined); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "hello") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split(undefined); __split[0] === "hello". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T28.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T28.js
new file mode 100644
index 000000000..7e1da1bd5
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T28.js
@@ -0,0 +1,40 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T28
+description: Call split("hellothere"), instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __split = __string.split("hellothere");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); __split = __string.split("hellothere"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("hello"); __split = __string.split("hellothere"); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "hello") {
+ $ERROR('#3: var __string = new String("hello"); __split = __string.split("hellothere"); __split[0] === "hello". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T29.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T29.js
new file mode 100644
index 000000000..53c7407cf
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T29.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T29
+description: Call split(1), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1);
+
+var __expected = ["","00","","","","22","33","44","60"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T3.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T3.js
new file mode 100644
index 000000000..3acafb459
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T3.js
@@ -0,0 +1,48 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T3
+description: Call split(/ /,2), instance is String("one two three four five")
+---*/
+
+var __string = new String("one two three four five");
+
+var __split = __string.split(/ /,2);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one") {
+ $ERROR('#3: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split[0] === "one". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "two") {
+ $ERROR('#4: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split[1] === "two". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T30.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T30.js
new file mode 100644
index 000000000..4bfb08038
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T30.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T30
+description: Call split(1,1), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1,1);
+
+var __expected = [""];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T31.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T31.js
new file mode 100644
index 000000000..8ea984bd9
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T31.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T31
+description: Call split(1,2), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1,2);
+
+var __expected = ["","00"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split[index] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T32.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T32.js
new file mode 100644
index 000000000..9de50ac62
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T32.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T32
+description: Call split(1,0), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1,0);
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T33.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T33.js
new file mode 100644
index 000000000..26dfb9756
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T33.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T33
+description: Call split(1,100), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1,100);
+
+var __expected = ["","00","","","","22","33","44","60"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split[index] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T34.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T34.js
new file mode 100644
index 000000000..b3595e654
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T34.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T34
+description: Call split(1,void 0), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1,void 0);
+
+var __expected = ["","00","","","","22","33","44","60"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3: __split[index] === __expected[index]. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T35.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T35.js
new file mode 100644
index 000000000..c34c1b11e
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T35.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T35
+description: Call split(1, Math.pow(2,32)-1), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1, Math.pow(2,32)-1);
+
+var __expected = ["","00","","","","22","33","44","60"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split[index] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T36.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T36.js
new file mode 100644
index 000000000..425e96f2b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T36.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T36
+description: Call split(1,"boo"), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1, "boo");
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T37.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T37.js
new file mode 100644
index 000000000..85a4bf128
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T37.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T37
+description: Call split(1,-Math.pow(2,32)+1), instance is Number
+---*/
+
+var __instance = new Number(100111122133144155);
+
+Number.prototype.split = String.prototype.split;
+
+var __split = __instance.split(1, -Math.pow(2,32)+1);
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T38.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T38.js
new file mode 100644
index 000000000..036a8e6ca
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T38.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T38
+description: Call split("l",NaN), instance is String("hello")
+---*/
+
+var __instance = new String("hello");
+
+var __split = __instance.split("l", NaN);
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T39.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T39.js
new file mode 100644
index 000000000..5dd312f55
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T39.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T39
+description: Call split("l",0), instance is String("hello")
+---*/
+
+var __instance = new String("hello");
+
+var __split = __instance.split("l", 0);
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T4.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T4.js
new file mode 100644
index 000000000..aa3e7788e
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T4.js
@@ -0,0 +1,64 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T4
+description: Call split(""), instance is String("one two three")
+---*/
+
+var __string = new String("one two three");
+
+var __split = __string.split("");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one two three"); __split = __string.split(""); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __string.length) {
+ $ERROR('#2: var __string = new String("one two three"); __split = __string.split(""); __split.length === __string.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "o") {
+ $ERROR('#3: var __string = new String("one two three"); __split = __string.split(""); __split[0] === "o". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "n") {
+ $ERROR('#4: var __string = new String("one two three"); __split = __string.split(""); __split[1] === "n". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[11] !== "e") {
+ $ERROR('#5: var __string = new String("one two three"); __split = __string.split(""); __split[11] === "e". Actual: '+__split[11] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if (__split[12] !== "e") {
+ $ERROR('#6: var __string = new String("one two three"); __split = __string.split(""); __split[12] === "e". Actual: '+__split[12] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T40.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T40.js
new file mode 100644
index 000000000..d3467c98e
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T40.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T40
+description: Call split("l",1), instance is String("hello")
+---*/
+
+var __instance = new String("hello");
+
+var __split = __instance.split("l", 1);
+
+var __expected = ["he"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T41.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T41.js
new file mode 100644
index 000000000..fd5cda505
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T41.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T41
+description: Call split("l",2), instance is String("hello")
+---*/
+
+var __instance = new String("hello");
+
+var __split = __instance.split("l", 2);
+
+var __expected = ["he",""];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 2); __expected = ["he",""]; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 2); __expected = ["he",""]; __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': var __instance = new String("hello"); __split = __instance.split("l", 2); __expected = ["he",""]; __split[index] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T42.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T42.js
new file mode 100644
index 000000000..30c6dab5b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T42.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T42
+description: Call split("l",3), instance is String("hello")
+---*/
+
+var __instance = new String("hello");
+
+var __split = __instance.split("l", 3);
+
+var __expected = ["he","","o"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 3); __expected = ["he","","o"]; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 3); __expected = ["he","","o"]; __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': var __instance = new String("hello"); __split = __instance.split("l", 3); __expected = ["he","","o"]; __split[index] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T43.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T43.js
new file mode 100644
index 000000000..bb40b0e84
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T43.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T43
+description: Call split("l",4), instance is String("hello")
+---*/
+
+var __instance = new String("hello");
+
+var __split = __instance.split("l", 4);
+
+var __expected = ["he","","o"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 4); __expected = ["he","","o"]; __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 4); __expected = ["he","","o"]; __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': var __instance = new String("hello"); __split = __instance.split("l", 4); __expected = ["he","","o"]; __split[index] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T5.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T5.js
new file mode 100644
index 000000000..86eef9fd9
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T5.js
@@ -0,0 +1,56 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T5
+description: Call split(/,/), instance is String("one-1,two-2,four-4")
+---*/
+
+var __string = new String("one-1,two-2,four-4");
+
+var __split = __string.split(/,/);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one-1") {
+ $ERROR('#3: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split[0] === "one-1". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "two-2") {
+ $ERROR('#4: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split[1] === "two-2". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "four-4") {
+ $ERROR('#5: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split[2] === "four-4". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T6.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T6.js
new file mode 100644
index 000000000..1e92814fa
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T6.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T6
+description: Call split(''), instance is String("one-1 two-2 four-4")
+---*/
+
+var __string = new String("one-1 two-2 three-3");
+
+var __split = __string.split('');
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one-1 two-2 three-3"); __split = __string.split(\'\'); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __string.length) {
+ $ERROR('#2: var __string = new String("one-1 two-2 three-3"); __split = __string.split(\'\'); __split.length === __string.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for ( var i = 0; i < __string.length; i++ ) {
+ if (__split[i]!==__string.charAt(i)) {
+ $ERROR('#3.'+i+': var __string = new String("one-1 two-2 three-3"); __split = __string.split(\'\'); __split['+i+']===__string.charAt('+i+'). Actual: '+__split[i]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T7.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T7.js
new file mode 100644
index 000000000..13b8d494b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T7.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T7
+description: >
+ Call split(void 0), instance is
+ "thisundefinedisundefinedaundefinedstringundefinedobject"
+---*/
+
+var __string = "thisundefinedisundefinedaundefinedstringundefinedobject";
+var __expected = [__string];
+
+var __split = __string.split(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = ["thisundefinedisundefinedaundefinedstringundefinedobject"]; __split = __string.split(void 0); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __string = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = ["thisundefinedisundefinedaundefinedstringundefinedobject"]; __split = __string.split(void 0); __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 = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = ["thisundefinedisundefinedaundefinedstringundefinedobject"]; __split = __string.split(void 0); __expected['+i+']==='+__split[i]+'. Actual: '+__expected[i]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T8.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T8.js
new file mode 100644
index 000000000..695e3f10b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T8.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T8
+description: Call split(null), instance is "thisnullisnullanullstringnullobject"
+---*/
+
+var __string = "thisnullisnullanullstringnullobject";
+var __expected = ["this", "is", "a", "string", "object"];
+
+var __split = __string.split(null);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(null); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __string = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(null); __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 = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(null); __expected['+i+']==='+__split[i]+'. Actual: '+__expected[i]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A2_T9.js b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T9.js
new file mode 100644
index 000000000..cef8fa0ec
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A2_T9.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. The substrings are determined by searching from left to right for occurrences of
+ separator; these occurrences are not part of any substring in the returned array, but serve to divide up
+ the string value. The value of separator may be a string of any length or it may be a RegExp object
+es5id: 15.5.4.14_A2_T9
+description: Call split(true), instance is "thistrueistrueatruestringtrueobject"
+---*/
+
+var __string = "thistrueistrueatruestringtrueobject";
+var __expected = ["this", "is", "a", "string", "object"];
+
+var __split = __string.split(true);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(true); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: var __string = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(true); __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 = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(true); __expected['+i+']==='+__split[i]+'. Actual: '+__expected[i]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T1.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T1.js
new file mode 100644
index 000000000..5033c11d3
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T1.js
@@ -0,0 +1,39 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T1
+description: Instance is String("one,two,three,four,five")
+---*/
+
+var __string = new String("one,two,three,four,five");
+
+var __split = __string.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("one,two,three,four,five"); __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("one,two,three,four,five"); __split = __string.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "one,two,three,four,five") {
+ $ERROR('#3: var __string = new String("one,two,three,four,five"); __split = __string.split(); __split[0] === "one,two,three,four,five". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T10.js
new file mode 100644
index 000000000..9135aad09
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T10.js
@@ -0,0 +1,39 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T10
+description: Instance is new String
+---*/
+
+var __string = new String;
+
+var __split = __string.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String; __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String; __split = __string.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "") {
+ $ERROR('#3: var __string = new String; __split = __string.split(); __split[0] === "". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T11.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T11.js
new file mode 100644
index 000000000..1fd971198
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T11.js
@@ -0,0 +1,39 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T11
+description: Instance is String(" ")
+---*/
+
+var __string = new String(" ");
+
+var __split = __string.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String(" "); __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String(" "); __split = __string.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== " ") {
+ $ERROR('#3: var __string = new String(" "); __split = __string.split(); __split[0] === " ". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T2.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T2.js
new file mode 100644
index 000000000..696ee1821
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T2.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T2
+description: Instance is Object()
+---*/
+
+var __instance = new Object();
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "[object Object]") {
+ $ERROR('#3: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "[object Object]". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T3.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T3.js
new file mode 100644
index 000000000..7d053882b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T3.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T3
+description: Instance is function(){}
+---*/
+
+var __instance = { toString: function() { return "function(){}";} };
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0].substring(0,8) !== "function") {
+ $ERROR('#3: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split[0].substring(0,8) === "function". Actual: '+__split[0].substring(0,8) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T4.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T4.js
new file mode 100644
index 000000000..039984030
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T4.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T4
+description: Instance is Number(NaN)
+---*/
+
+var __instance = new Number(NaN);
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "NaN") {
+ $ERROR('#3: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "NaN". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T5.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T5.js
new file mode 100644
index 000000000..5bec6163b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T5.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T5
+description: Instance is Number(-1234567890)
+---*/
+
+var __instance = new Number(-1234567890);
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "-1234567890") {
+ $ERROR('#3: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "-1234567890". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T6.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T6.js
new file mode 100644
index 000000000..9efaed995
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T6.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T6
+description: Instance is Number(-1e21)
+---*/
+
+var __instance = new Number(-1e21);
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __instance.toString()) {
+ $ERROR('#3: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === __instance.toString(). Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T7.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T7.js
new file mode 100644
index 000000000..68f52970b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T7.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T7
+description: Instance is Math
+---*/
+
+var __instance = Math;
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "[object Math]") {
+ $ERROR('#3: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "[object Math]". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T8.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T8.js
new file mode 100644
index 000000000..83f86cd7c
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T8.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T8
+description: Instance is Array(1,2,3,4,5)
+---*/
+
+var __instance = new Array(1,2,3,4,5);
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "1,2,3,4,5") {
+ $ERROR('#3: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "1,2,3,4,5". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A3_T9.js b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T9.js
new file mode 100644
index 000000000..53c8ac47b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A3_T9.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split() returns an Array object with:
+ i) length equaled to 1,
+ ii) [[Get]](0) equaled to the result of converting this object to a string
+es5id: 15.5.4.14_A3_T9
+description: Instance is Boolean
+---*/
+
+var __instance = new Boolean;
+
+__instance.split = String.prototype.split;
+
+var __split = __instance.split();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "false") {
+ $ERROR('#3: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "false". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T1.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T1.js
new file mode 100644
index 000000000..56b959b2f
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T1.js
@@ -0,0 +1,57 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T1
+description: Argument is regexp /l/, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "o") {
+ $ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split[2] === "o". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T10.js
new file mode 100644
index 000000000..efe554813
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T10.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T10
+description: Argument is new RegExp, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re);
+
+var __expected = ["h","e","l","l","o"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T11.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T11.js
new file mode 100644
index 000000000..2417ac9b0
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T11.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T11
+description: Arguments are new RegExp and 0, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, 0);
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T12.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T12.js
new file mode 100644
index 000000000..99d061824
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T12.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T12
+description: Arguments are new RegExp and 1, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, 1);
+
+var __expected = ["h"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T13.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T13.js
new file mode 100644
index 000000000..91e02c294
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T13.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T13
+description: Arguments are new RegExp and 2, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, 2);
+
+var __expected = ["h", "e"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T14.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T14.js
new file mode 100644
index 000000000..c4bf9f96b
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T14.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T14
+description: Arguments are new RegExp and 3, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, 3);
+
+var __expected = ["h", "e", "l"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T15.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T15.js
new file mode 100644
index 000000000..257934f9f
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T15.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T15
+description: Arguments are new RegExp and 4, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, 4);
+
+var __expected = ["h", "e", "l" ,"l"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T16.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T16.js
new file mode 100644
index 000000000..d8fbe52cf
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T16.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T16
+description: >
+ Arguments are new RegExp and void 0, and instance is
+ String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, void 0);
+
+var __expected = ["h", "e", "l", "l", "o"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T17.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T17.js
new file mode 100644
index 000000000..5451e6ab7
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T17.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T17
+description: >
+ Arguments are new RegExp and undefined, and instance is
+ String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, undefined);
+
+var __expected = ["h", "e", "l", "l", "o"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T18.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T18.js
new file mode 100644
index 000000000..9e5db9b5f
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T18.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T18
+description: Arguments are new RegExp and "hi", and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = new RegExp;
+
+var __split = __string.split(__re, "hi");
+
+var __expected = [];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T19.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T19.js
new file mode 100644
index 000000000..2373af0a6
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T19.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T19
+description: Argument is regexp /\s/, and instance is String("a b c de f")
+---*/
+
+var __string = new String("a b c de f");
+
+var __re = /\s/;
+
+var __split = __string.split(__re);
+
+var __expected = ["a","b","c","de","f"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T2.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T2.js
new file mode 100644
index 000000000..2531820ec
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T2.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T2
+description: Arguments are regexp /l/ and 0, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re,0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,0); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 0) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,0); __split.length === 0. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T20.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T20.js
new file mode 100644
index 000000000..c3587acce
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T20.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T20
+description: >
+ Arguments are regexp /\s/ and 3, and instance is String("a b c de
+ f")
+---*/
+
+var __string = new String("a b c de f");
+
+var __re = /\s/;
+
+var __split = __string.split(__re,3);
+
+var __expected = ["a","b","c"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T21.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T21.js
new file mode 100644
index 000000000..607bca784
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T21.js
@@ -0,0 +1,43 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T21
+description: Argument is regexp /\X/, and instance is String("a b c de f")
+---*/
+
+var __string = new String("a b c de f");
+
+var __re = /X/;
+
+var __split = __string.split(__re);
+
+var __expected = ["a b c de f"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== __expected[0]) {
+ $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T22.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T22.js
new file mode 100644
index 000000000..e22f1c4c7
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T22.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T22
+description: >
+ Argument is regexp /\d+/, and instance is String("dfe23iu 34
+ =+65--")
+---*/
+
+var __string = new String("dfe23iu 34 =+65--");
+
+var __re = /\d+/;
+
+var __split = __string.split(__re);
+
+var __expected = ["dfe","iu "," =+","--"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T23.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T23.js
new file mode 100644
index 000000000..300aa4419
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T23.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T23
+description: >
+ Argument is regexp RegExp('\\d+'), and instance is String("dfe23iu
+ 34 =+65--")
+---*/
+
+var __string = new String("dfe23iu 34 =+65--");
+
+var __re = new RegExp('\\d+');
+
+var __split = __string.split(__re);
+
+var __expected = ["dfe","iu "," =+","--"];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T24.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T24.js
new file mode 100644
index 000000000..72dd62339
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T24.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T24
+description: Argument is regexp /[a-z]/, and instance is String("abc")
+---*/
+
+var __string = new String("abc");
+
+var __re = /[a-z]/;
+
+var __split = __string.split(__re);
+
+var __expected = ["","","",""];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T25.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T25.js
new file mode 100644
index 000000000..4b4716689
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T25.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T25
+description: Argument is RegExp('[a-z]'), and instance is String("abc")
+---*/
+
+var __string = new String("abc");
+
+var __re = new RegExp('[a-z]');
+
+var __split = __string.split(__re);
+
+var __expected = ["","","",""];
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== __expected.length) {
+ $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+for(var index=0; index<__expected.length; index++) {
+ if (__split[index] !== __expected[index]) {
+ $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T3.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T3.js
new file mode 100644
index 000000000..13304d038
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T3.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T3
+description: Arguments are regexp /l/ and 1, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re,1);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,1); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 1) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,1); __split.length === 1. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,1); __split[0] === "he". Actual: '+__split[0] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T4.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T4.js
new file mode 100644
index 000000000..f3858c465
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T4.js
@@ -0,0 +1,49 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T4
+description: Arguments are regexp /l/ and 2, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re,2);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 2) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split.length === 2. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split[1] === "". Actual: '+__split[1] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T5.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T5.js
new file mode 100644
index 000000000..5fa0eaea7
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T5.js
@@ -0,0 +1,57 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T5
+description: Arguments are regexp /l/ and 3, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re,3);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "o") {
+ $ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split[2] === "o". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T6.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T6.js
new file mode 100644
index 000000000..2e05816dd
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T6.js
@@ -0,0 +1,57 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T6
+description: Arguments are regexp /l/ and 4, and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re,4);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "o") {
+ $ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split[2] === "o". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T7.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T7.js
new file mode 100644
index 000000000..a05009431
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T7.js
@@ -0,0 +1,59 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T7
+description: >
+ Arguments are regexp /l/ and void 0, and instance is
+ String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re, void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "o") {
+ $ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split[2] === "o". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T8.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T8.js
new file mode 100644
index 000000000..d1caabfb0
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T8.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T8
+description: Arguments are regexp /l/ and "hi", and instance is String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re, "hi");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, "hi"); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 0) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, "hi"); __split.length === 0. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A4_T9.js b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T9.js
new file mode 100644
index 000000000..78b82ff82
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A4_T9.js
@@ -0,0 +1,59 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have
+ been stored. If separator is a regular expression then
+ inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding
+es5id: 15.5.4.14_A4_T9
+description: >
+ Arguments are regexp /l/ and undefined, and instance is
+ String("hello")
+---*/
+
+var __string = new String("hello");
+
+var __re = /l/;
+
+var __split = __string.split(__re, undefined);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__split.constructor !== Array) {
+ $ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split.constructor === Array. Actual: '+__split.constructor );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__split.length !== 3) {
+ $ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split.length === 3. Actual: '+__split.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__split[0] !== "he") {
+ $ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split[0] === "he". Actual: '+__split[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__split[1] !== "") {
+ $ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split[1] === "". Actual: '+__split[1]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if (__split[2] !== "o") {
+ $ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split[2] === "o". Actual: '+__split[2] );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A6.js b/test/built-ins/String/prototype/split/S15.5.4.14_A6.js
new file mode 100644
index 000000000..8d714bf6d
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.split has not prototype property
+es5id: 15.5.4.14_A6
+description: Checking String.prototype.split.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.split.prototype !== undefined) {
+ $ERROR('#1: String.prototype.split.prototype === undefined. Actual: '+String.prototype.split.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A7.js b/test/built-ins/String/prototype/split/S15.5.4.14_A7.js
new file mode 100644
index 000000000..791a2c096
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.split can't be used as constructor
+es5id: 15.5.4.14_A7
+description: Checking if creating the String.prototype.split object fails
+includes:
+ - $FAIL.js
+ - Test262Error.js
+---*/
+
+var __FACTORY = String.prototype.split;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.split; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if (e instanceof Test262Error) throw e;
+}
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A8.js b/test/built-ins/String/prototype/split/S15.5.4.14_A8.js
new file mode 100644
index 000000000..153a0ad55
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.split.length property has the attribute DontEnum
+es5id: 15.5.4.14_A8
+description: >
+ Checking if enumerating the String.prototype.split.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.split.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.split.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.split.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.split.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.split){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.split){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A9.js b/test/built-ins/String/prototype/split/S15.5.4.14_A9.js
new file mode 100644
index 000000000..532cd97f1
--- /dev/null
+++ b/test/built-ins/String/prototype/split/S15.5.4.14_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.split.length property does not have the attribute
+ DontDelete
+es5id: 15.5.4.14_A9
+description: >
+ Checking if deleting the String.prototype.split.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.split.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.split.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.split.length) {
+ $ERROR('#1: delete String.prototype.split.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.split.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.split.length; String.prototype.split.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.split.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js
new file mode 100644
index 000000000..0a181faa2
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.substring.length property has the attribute ReadOnly
+es5id: 15.5.4.15_A10
+description: >
+ Checking if varying the String.prototype.substring.length property
+ fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.substring.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.substring.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.substring.length;
+
+String.prototype.substring.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.substring.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.substring.length; String.prototype.substring.length = function(){return "shifted";}; String.prototype.substring.length === __obj. Actual: '+String.prototype.substring.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A11.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A11.js
new file mode 100644
index 000000000..020b8a0c5
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the substring method is 2
+es5id: 15.5.4.15_A11
+description: Checking String.prototype.substring.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.substring.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.substring.hasOwnProperty("length") return true. Actual: '+String.prototype.substring.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.substring.length !== 2) {
+ $ERROR('#2: String.prototype.substring.length === 2. Actual: '+String.prototype.substring.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T1.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T1.js
new file mode 100644
index 000000000..c737a2f30
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T1
+description: Arguments are false and true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(false, true) !== "t") {
+ $ERROR('#1: __instance = new Object(true); __instance.substring = String.prototype.substring; __instance.substring(false, true) === "t". Actual: '+__instance.substring(false, true) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js
new file mode 100644
index 000000000..dcebf1082
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T10.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T10
+description: >
+ Arguments are object and function call, and instance is String,
+ object have overrided valueOf function
+---*/
+
+var __obj = {valueOf:function(){return 2;}};
+
+var __str = "\u0035ABBBABAB";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ if (substring(__obj, function(){return substring(0,1);}()) !== "BBB") {
+ $ERROR('#1: var __obj = {valueOf:function(){return 2;}}; var __str = "\u0035ABBBABAB"; substring(__obj, function(){return substring(0,1);}()) === "BBB". Actual: '+substring(__obj, function(){return substring(0,1);}()) );
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js
new file mode 100644
index 000000000..1eb918c75
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T11.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T11
+description: >
+ Arguments are objects, and instance is string, objects have
+ overrided valueOf function, that return exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {valueOf:function(){throw "instart";}};
+var __obj2 = {valueOf:function(){throw "inend";}};
+var __str = {str__:"ABB\u0041BABAB"};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ with(str__){
+ try {
+ var x = substring(__obj,__obj2);
+ $FAIL('#1: "var x = substring(__obj,__obj2)" lead to throw exception');
+ } catch (e) {
+ if (e!=="instart") {
+ $ERROR('#1.1: Exception === "instart". Actual: '+e);
+ }
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js
new file mode 100644
index 000000000..4590ef9e3
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T12.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T12
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided valueOf function and toString function, that return
+ exception. Second object have overrided valueOf function, that
+ return exception
+includes: [$FAIL.js]
+---*/
+
+var __obj = {valueOf:function(){return {};}, toString:function(){throw "instart";}};
+var __obj2 = {valueOf:function(){throw "inend";}};
+var __str = new String("ABB\u0041BABAB");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+with(__str){
+ try {
+ var x = substring(__obj, __obj2);
+ $FAIL('#1: "var x = substring(__obj,__obj2)" lead to throw exception');
+ } catch (e) {
+ if (e!=="instart") {
+ $ERROR('#1.1: Exception ==="instart". Actual: '+e);
+ }
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
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
new file mode 100644
index 000000000..656b85f5e
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T13.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T13
+description: >
+ Arguments are objects, and instance is string. First object have
+ overrided valueOf and toString functions. Second object have
+ overrided toString function, that return exception
+includes: [$FAIL.js]
+---*/
+
+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);
+ $FAIL('#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);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T14.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T14.js
new file mode 100644
index 000000000..e9e4d0750
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T14.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T14
+description: Used one argument, that is function(){}(). Instance is string
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("report".substring(function(){}()) !== "report") {
+ $ERROR('#1: "report".substring(function(){}()) === "report". Actual: '+"report".substring(function(){}()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T15.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T15.js
new file mode 100644
index 000000000..50af2e9d8
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T15.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T15
+description: >
+ Call substring without arguments. Instance is Number with
+ prototype.substring = String.prototype.substring
+---*/
+
+var __num = 11.001002;
+
+Number.prototype.substring = String.prototype.substring;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__num.substring()!=="11.001002") {
+ $ERROR('#1: var __num = 11.001002; Number.prototype.substring = String.prototype.substring; __num.substring()==="11.001002". Actual: '+__num.substring());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T2.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T2.js
new file mode 100644
index 000000000..21abf6d49
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T2.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T2
+description: >
+ Arguments are function call and x, and instance is Boolean. x is
+ undefined variable
+---*/
+
+var __instance = new Boolean;
+
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(function(){return true;}(),x) !== "alse") {
+ $ERROR('#1: var x; __instance = new Boolean; __instance.substring = String.prototype.substring; __instance.substring(function(){return true;}(),x) === "alse". Actual: '+__instance.substring(function(){return true;}(),x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T4.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T4.js
new file mode 100644
index 000000000..8e5be04b6
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T4.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T4
+description: >
+ Arguments are null and number, and instance is function call, that
+ returned string
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (function(){return "gnulluna"}().substring(null, -3) !== "") {
+ $ERROR('#1: function(){return "gnulluna"}().substring(null, -3) === "". Actual: '+function(){return "gnulluna"}().substring(null, -3) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T5.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T5.js
new file mode 100644
index 000000000..2f716f58a
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T5.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T5
+description: >
+ Arguments are null and Function(), and instance is function
+ object, that have overrided valueOf function
+---*/
+
+__func.valueOf=function(){return "gnulluna"};
+
+Function.prototype.substring=String.prototype.substring;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__func.substring(null, Function()) !== "") {
+ $ERROR('#1: __func.valueOf=function(){return "gnulluna"}; Function.prototype.substring=String.prototype.substring; function __func(){}; __func.substring(null, Function()) === "". Actual: '+__func.substring(null, Function()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __func(){};
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T6.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T6.js
new file mode 100644
index 000000000..d41f4b1c2
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T6.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T6
+description: >
+ Arguments are x and number, and instance is new String, x is
+ undefined variable
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (new String("undefined").substring(x,3) !== "und") {
+ $ERROR('#1: var x; new String("undefined").substring(x,3) === "und". Actual: '+new String("undefined").substring(x,3) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T7.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T7.js
new file mode 100644
index 000000000..eecbb5da7
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T7.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T7
+description: Arguments are symbol and undefined, and instance is String
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String(void 0).substring("e",undefined) !== "undefined") {
+ $ERROR('#1: String(void 0).substring("e",undefined) === "undefined". Actual: '+String(void 0).substring("e",undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T8.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T8.js
new file mode 100644
index 000000000..c7e0a5953
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T8.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T8
+description: >
+ Arguments are negative number and void 0, and instance is
+ String(object), object have overrided toString function
+---*/
+
+var __obj = {toString:function(){}};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String(__obj).substring(-4,void 0) !== "undefined") {
+ $ERROR('#1: __obj = {toString:function(){}}; String(__obj).substring(-4,void 0) === "undefined". Actual: '+String(__obj).substring(-4,void 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T9.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T9.js
new file mode 100644
index 000000000..b4b0053b9
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A1_T9.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end)
+es5id: 15.5.4.15_A1_T9
+description: >
+ Arguments are undefined and object, and instance is new
+ String(object), object have overrided valueOf and toString
+ functions
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (new String(__obj).substring(/*(function(){})()*/undefined,undefined) !== "undefined") {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).substring(/*(function(){})()*/undefined,undefined) === "undefined". Actual: '+new String(__obj).substring(/*(function(){})()*/undefined,undefined) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T1.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T1.js
new file mode 100644
index 000000000..a87e1b4e5
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T1
+description: Checking type of substring()
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __string.substring() !== "string") {
+ $ERROR('#1: __string = new String("this is a string object"); typeof __string.substring() === "string". Actual: '+typeof __string.substring() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T10.js
new file mode 100644
index 000000000..44c719d2e
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T10.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T10
+description: start is 0, end is 8
+---*/
+
+var __string = new String("this_is_a_string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(0,8) !== "this_is_") {
+ $ERROR('#1: __string = new String("this_is_a_string object"); __string.substring(0,8) === "this_is_". Actual: '+__string.substring(0,8) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T2.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T2.js
new file mode 100644
index 000000000..179af831e
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T2
+description: start is NaN, end is Infinity
+---*/
+
+var __string = new String('this is a string object');
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(NaN, Infinity) !== "this is a string object") {
+ $ERROR('#1: __string = new String(\'this is a string object\'); __string.substring(NaN, Infinity) === "this is a string object". Actual: '+__string.substring(NaN, Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T3.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T3.js
new file mode 100644
index 000000000..18201d070
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T3.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T3
+description: Call substring from empty String object
+---*/
+
+var __string = new String("");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(1,0) !== "") {
+ $ERROR('#1: __string = new String(""); __string.substring(1,0) === "". Actual: '+__string.substring(1,0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T4.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T4.js
new file mode 100644
index 000000000..d10dc05a3
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T4.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T4
+description: start is Infinity, end is NaN
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(Infinity, NaN) !== "this is a string object") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.substring(Infinity, NaN) === "this is a string object". Actual: '+__string.substring(Infinity, NaN) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T5.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T5.js
new file mode 100644
index 000000000..6d5d0a849
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T5.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T5
+description: start is Infinity, end is Infinity
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(Infinity, Infinity) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.substring(Infinity, Infinity) === "". Actual: '+__string.substring(Infinity, Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T6.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T6.js
new file mode 100644
index 000000000..aec40ce40
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T6
+description: start is negative float number, end is 0
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(-0.01,0) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.substring(-0.01,0) === "". Actual: '+__string.substring(-0.01,0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T7.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T7.js
new file mode 100644
index 000000000..4ce872828
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T7
+description: start is tested_string.length, end is tested_string.length
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(__string.length, __string.length) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.substring(__string.length, __string.length) === "". Actual: '+__string.substring(__string.length, __string.length) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T8.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T8.js
new file mode 100644
index 000000000..e73ef3e64
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T8.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T8
+description: start is tested_string.length+1, end is 0
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(__string.length+1, 0) !== "this is a string object") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.substring(__string.length+1, 0) === "this is a string object". Actual: '+__string.substring(__string.length+1, 0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T9.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T9.js
new file mode 100644
index 000000000..4ba78e6d7
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A2_T9.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring (start, end) returns a string value(not object)
+es5id: 15.5.4.15_A2_T9
+description: start is -Infinity, end is -Infinity
+---*/
+
+var __string = new String("this is a string object");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__string.substring(-Infinity, -Infinity) !== "") {
+ $ERROR('#1: __string = new String("this is a string object"); __string.substring(-Infinity, -Infinity) === "". Actual: '+__string.substring(-Infinity, -Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T1.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T1.js
new file mode 100644
index 000000000..cc2726e2c
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T1.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T1
+description: >
+ Apply String.prototype.substring to Array instance. Start is
+ Infinity, end is -Infinity
+---*/
+
+var __instance = new Array(1,2,3,4,5);
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(Infinity,-Infinity) !== "1,2,3,4,5") {
+ $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(Infinity,-Infinity) === "1,2,3,4,5". Actual: '+__instance.substring(Infinity,-Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T10.js
new file mode 100644
index 000000000..10f25f237
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T10.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T10
+description: >
+ Checknig if applying String.prototype.substring to Function object
+ instance passes
+---*/
+
+__FACTORY.prototype.substring = String.prototype.substring;
+
+var __instance = new __FACTORY(void 0);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(0, 100) !== "undefined") {
+ $ERROR('#1: __instance.substring(0, 100) === "undefined". Actual: '+__instance.substring(0, 100) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __FACTORY( value ) {
+ this.value = value;
+ this.toString = function() { return this.value+''; }
+}
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T11.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T11.js
new file mode 100644
index 000000000..bdb175495
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T11
+description: >
+ Apply String.prototype.substring to Boolean instance. Start is new
+ Array(), end is new Boolean(1)
+---*/
+
+var __instance = new Boolean();
+
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(new Array(), new Boolean(1)) !== "f") {
+ $ERROR('#1: __instance = new Boolean(); __instance.substring = String.prototype.substring; __instance.substring(new Array(), new Boolean(1)) === "f". Actual: '+__instance.substring(new Array(), new Boolean(1)) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T2.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T2.js
new file mode 100644
index 000000000..5e3bff518
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T2.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T2
+description: >
+ Apply String.prototype.substring to Array instance. Start is 9,
+ end is -Infinity
+---*/
+
+var __instance = new Array(1,2,3,4,5);
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(9,-Infinity) !== "1,2,3,4,5") {
+ $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(9,-Infinity) === "1,2,3,4,5". Actual: '+__instance.substring(9,-Infinity) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T3.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T3.js
new file mode 100644
index 000000000..fce5c61e2
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T3.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T3
+description: >
+ Apply String.prototype.substring to Array instance. Start is true,
+ end is false
+---*/
+
+var __instance = new Array(1,2,3,4,5);
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(true, false) !== "1") {
+ $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(true, false) === "1". Actual: '+__instance.substring(true, false) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T4.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T4.js
new file mode 100644
index 000000000..51cddf00e
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T4.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T4
+description: >
+ Apply String.prototype.substring to Array instance. Start is '4',
+ end is '5'
+---*/
+
+var __instance = new Array(1,2,3,4,5);
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring('4', '5') !== "3") {
+ $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(\'4\', \'5\') === "3". Actual: '+__instance.substring('4', '5') );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T5.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T5.js
new file mode 100644
index 000000000..12ab7ac30
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T5.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T5
+description: >
+ Apply String.prototype.substring to Object instance. Start is 8,
+ end is 0
+---*/
+
+var __instance = new Object();
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(8,0) !== "[object ") {
+ $ERROR('#1: __instance = new Object(); __instance.substring = String.prototype.substring; __instance.substring(8,0) === "[object ". Actual: '+__instance.substring(8,0) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T6.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T6.js
new file mode 100644
index 000000000..6be8e2206
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T6.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T6
+description: >
+ Apply String.prototype.substring to Object instance. Start is 8,
+ end is length of object.toString
+---*/
+
+var __instance = new Object();
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(8, __instance.toString().length) !== "Object]") {
+ $ERROR('#1: __instance = new Object(); __instance.substring = String.prototype.substring; __instance.substring(8, __instance.toString().length) === "Object]". Actual: '+__instance.substring(8, __instance.toString().length) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T7.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T7.js
new file mode 100644
index 000000000..0294a60cc
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T7.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T7
+description: >
+ Apply String.prototype.substring to Object instance. Call
+ instance.substring(...).substring(...)
+---*/
+
+var __instance = { toString: function() { return "function(){}";} };
+
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(-Infinity,8) !== "function") {
+ $ERROR('#1: __instance = function(){}; __instance.substring = String.prototype.substring; __instance.substring(-Infinity,8) === "function". Actual: '+__instance.substring(8,Infinity).substring(-Infinity,1) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T8.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T8.js
new file mode 100644
index 000000000..d36140f05
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T8.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T8
+description: >
+ Apply String.prototype.substring to Number instance. Start is
+ Infinity, end is NaN
+---*/
+
+var __instance = new Number(NaN);
+
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(Infinity, NaN) !== "NaN") {
+ $ERROR('#1: __instance = new Number(NaN); __instance.substring = String.prototype.substring; __instance.substring(Infinity, NaN) === "NaN". Actual: '+__instance.substring(Infinity, NaN) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T9.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T9.js
new file mode 100644
index 000000000..64ab3bd9b
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A3_T9.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.substring (start, end) can be applied to non String object instance and
+ returns a string value(not object)
+es5id: 15.5.4.15_A3_T9
+description: >
+ Apply String.prototype.substring to Math instance. Start is
+ Math.PI, end is -10
+---*/
+
+var __instance = Math;
+
+__instance.substring = String.prototype.substring;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.substring(Math.PI, -10) !== "[ob") {
+ $ERROR('#1: __instance = Math; __instance.substring = String.prototype.substring; __instance.substring(Math.PI, -10) === "[ob". Actual: '+__instance.substring(Math.PI, -10) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A6.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A6.js
new file mode 100644
index 000000000..bc4cccb70
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring has not prototype property
+es5id: 15.5.4.15_A6
+description: Checking String.prototype.substring.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.substring.prototype !== undefined) {
+ $ERROR('#1: String.prototype.substring.prototype === undefined. Actual: '+String.prototype.substring.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A7.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A7.js
new file mode 100644
index 000000000..725f5fe45
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A7.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.substring can't be used as constructor
+es5id: 15.5.4.15_A7
+description: Checking if creating the String.prototype.substring object fails
+includes:
+ - $PRINT.js
+ - $FAIL.js
+---*/
+
+var __FACTORY = String.prototype.substring;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.substring; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.2: undefined = 1 throw a TypeError. Actual: ' + (e));
+ }
+ $PRINT(e);
+}
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A8.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A8.js
new file mode 100644
index 000000000..9409caef4
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A8.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The String.prototype.substring.length property has the attribute DontEnum
+es5id: 15.5.4.15_A8
+description: >
+ Checking if enumerating the String.prototype.substring.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.substring.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.substring.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.substring.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.substring.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (var p in String.prototype.substring){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.substring){if (p==="length") count++;} count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A9.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A9.js
new file mode 100644
index 000000000..9d710f106
--- /dev/null
+++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.substring.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.15_A9
+description: >
+ Checking if deleting the String.prototype.substring.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.substring.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.substring.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.substring.length) {
+ $ERROR('#1: delete String.prototype.substring.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.substring.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.substring.length; String.prototype.substring.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.substring.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js
new file mode 100644
index 000000000..c9af9c15c
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLocaleLowerCase.length property has the attribute
+ ReadOnly
+es5id: 15.5.4.17_A10
+description: >
+ Checking if varying the String.prototype.toLocaleLowerCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.toLocaleLowerCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+__obj = String.prototype.toLocaleLowerCase.length;
+
+String.prototype.toLocaleLowerCase.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLocaleLowerCase.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.toLocaleLowerCase.length; String.prototype.toLocaleLowerCase.length = function(){return "shifted";}; String.prototype.toLocaleLowerCase.length === __obj. Actual: '+String.prototype.toLocaleLowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A11.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A11.js
new file mode 100644
index 000000000..c6ca64f03
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the toLocaleLowerCase method is 0
+es5id: 15.5.4.17_A11
+description: Checking String.prototype.toLocaleLowerCase.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toLocaleLowerCase.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.toLocaleLowerCase.hasOwnProperty("length") return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLocaleLowerCase.length !== 0) {
+ $ERROR('#2: String.prototype.toLocaleLowerCase.length === 0. Actual: '+String.prototype.toLocaleLowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T1.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T1.js
new file mode 100644
index 000000000..b929ade1d
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T1
+description: Arguments is true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toLocaleLowerCase() !== "true") {
+ $ERROR('#1: __instance = new Object(true); __instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __instance.toLocaleLowerCase() === "true". Actual: '+__instance.toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T10.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T10.js
new file mode 100644
index 000000000..cfdc535d8
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T10.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T10
+description: >
+ Call toLocaleLowerCase() function of object with overrode toString
+ function
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toLocaleLowerCase() !=="ab") {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __obj.toLocaleLowerCase() ==="ab". Actual: '+__obj.toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T11.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T11.js
new file mode 100644
index 000000000..5512af258
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T11.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T11
+description: >
+ Override toString function, toString throw exception, then call
+ toLocaleLowerCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}}
+__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toLocaleLowerCase();
+ $FAIL('#1: "var x = __obj.toLocaleLowerCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T12.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T12.js
new file mode 100644
index 000000000..6e1693a91
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T12.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T12
+description: >
+ Override toString and valueOf functions, valueOf throw exception,
+ then call toLocaleLowerCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}
+__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toLocaleLowerCase();
+ $FAIL('#1: "var x = __obj.toLocaleLowerCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T13.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T13.js
new file mode 100644
index 000000000..eb19ac07c
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T13.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T13
+description: >
+ Override toString and valueOf functions, then call
+ toLocaleLowerCase() function for this object
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}
+__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toLocaleLowerCase() !=="1") {
+ $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __obj.toLocaleLowerCase() ==="1". Actual: '+__obj.toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__obj.toLocaleLowerCase().length !== 1) {
+ $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __obj.toLocaleLowerCase().length === 1. Actual: '+__obj.toLocaleLowerCase().length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T14.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T14.js
new file mode 100644
index 000000000..95da90ec3
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T14.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T14
+description: Call toLocaleLowerCase() function for RegExp object
+---*/
+
+var __reg = new RegExp("ABC");
+__reg.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__reg.toLocaleLowerCase() !== "/abc/") {
+ $ERROR('#1: var __reg = new RegExp("ABC"); __reg.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __reg.toLocaleLowerCase() === "/abc/". Actual: '+__reg.toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T2.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T2.js
new file mode 100644
index 000000000..d20cef4b2
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T2
+description: Instance is Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toLocaleLowerCase() !== "false") {
+ $ERROR('#1: __instance = new Boolean; __instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __instance.toLocaleLowerCase() === "false". Actual: '+__instance.toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T3.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T3.js
new file mode 100644
index 000000000..00eca997a
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T3.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T3
+description: Checking by using eval
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (eval("\"BJ\"").toLocaleLowerCase() !== "bj") {
+ $ERROR('#1: eval("\\"BJ\\"").toLocaleLowerCase() === "bj". Actual: '+eval("\"BJ\"").toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T4.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T4.js
new file mode 100644
index 000000000..04b36119a
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T4.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T4
+description: >
+ Call toLocaleLowerCase() function without arguments of string and
+ from empty string
+---*/
+
+var __lowerCase = "".toLocaleLowerCase();
+
+var __expected = "";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __lowerCase = "".toLocaleLowerCase(); __expected = ""; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __lowerCase = "".toLocaleLowerCase(); __expected = ""; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __lowerCase = "".toLocaleLowerCase(); __expected = ""; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__lowerCase[0]!==__expected[0]) {
+ $ERROR('#4: __lowerCase = "".toLocaleLowerCase(); __expected = ""; __lowerCase[0]===__expected[0]. Actual: '+__lowerCase[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T5.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T5.js
new file mode 100644
index 000000000..fb3d25143
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T5
+description: Call toLocaleLowerCase() function for function call
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" match(null) evaluates to match("null")
+if (function(){return "GnulLuNa"}().toLocaleLowerCase() !== "gnulluna") {
+ $ERROR('#1: function(){return "GnulLuNa"}().toLocaleLowerCase() === "gnulluna". Actual: '+function(){return "GnulLuNa"}().toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T6.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T6.js
new file mode 100644
index 000000000..6339d0011
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T6
+description: Call toLocaleLowerCase() function of Number.NEGATIVE_INFINITY
+---*/
+
+Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((Number.NEGATIVE_INFINITY).toLocaleLowerCase() !== "-infinity") {
+ $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; (Number.NEGATIVE_INFINITY).toLocaleLowerCase() === "-infinity". Actual: '+(Number.NEGATIVE_INFINITY).toLocaleLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T7.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T7.js
new file mode 100644
index 000000000..fcd3a61e2
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T7
+description: Call toLocaleLowerCase() function of NaN
+---*/
+
+Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (NaN.toLocaleLowerCase()!== "nan") {
+ $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; NaN.toLocaleLowerCase()=== "nan". Actual: '+NaN.toLocaleLowerCase());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T8.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T8.js
new file mode 100644
index 000000000..17ccebbee
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T8.js
@@ -0,0 +1,14 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T8
+description: Call toLocaleLowerCase() function of Infinity
+---*/
+
+Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase;
+
+if (Infinity.toLocaleLowerCase()!== "infinity") {
+ $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; Infinity.toLocaleLowerCase()=== "infinity". Actual: '+Infinity.toLocaleLowerCase());
+}
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T9.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T9.js
new file mode 100644
index 000000000..94129acfc
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A1_T9.js
@@ -0,0 +1,52 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase()
+es5id: 15.5.4.17_A1_T9
+description: Call toLocaleLowerCase() function of string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+var __lowerCase = new String(__obj).toLocaleLowerCase();
+
+
+var __expected ="undefined";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected ="undefined"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected ="undefined"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected ="undefined"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__lowerCase[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected ="undefined"; __lowerCase['+index+']=== '+__expected[index]+'. Actual: '+__lowerCase[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A2_T1.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A2_T1.js
new file mode 100644
index 000000000..c5992faf9
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A2_T1.js
@@ -0,0 +1,34 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.toLocaleLowerCase() return a string, but not a String
+ object
+es5id: 15.5.4.17_A2_T1
+description: Checking returned result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("Hello, WoRlD!".toLocaleLowerCase() !== "hello, world!") {
+ $ERROR('#1: "Hello, WoRlD!".toLocaleLowerCase() === "hello, world!". Actual: '+("Hello, WoRlD!".toLocaleLowerCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if ("Hello, WoRlD!".toLocaleLowerCase() !== String("hello, world!")) {
+ $ERROR('#2: "Hello, WoRlD!".toLocaleLowerCase() === String("hello, world!"). Actual: '+("Hello, WoRlD!".toLocaleLowerCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if ("Hello, WoRlD!".toLocaleLowerCase() === new String("hello, world!")) {
+ $ERROR('#3: "Hello, WoRlD!".toLocaleLowerCase() !== new String("hello, world!")');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A6.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A6.js
new file mode 100644
index 000000000..de23fd2e5
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase has not prototype property
+es5id: 15.5.4.17_A6
+description: Checking String.prototype.toLocaleLowerCase.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.toLocaleLowerCase.prototype !== undefined) {
+ $ERROR('#1: String.prototype.toLocaleLowerCase.prototype === undefined. Actual: '+String.prototype.toLocaleLowerCase.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A7.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A7.js
new file mode 100644
index 000000000..1092cb0b4
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A7.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleLowerCase can't be used as constructor
+es5id: 15.5.4.17_A7
+description: >
+ Checking if creating the String.prototype.toLocaleLowerCase object
+ fails
+includes:
+ - $PRINT.js
+ - $FAIL.js
+---*/
+
+var __FACTORY = String.prototype.toLocaleLowerCase;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: var __FACTORY = String.prototype.toLocaleLowerCase; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.1: var __FACTORY = String.prototype.toLocaleLowerCase; "var __instance = new __FACTORY" throw a TypeError. Actual: ' + (e));
+ }
+ $PRINT(e);
+}
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A8.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A8.js
new file mode 100644
index 000000000..2db5d4b02
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A8.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLocaleLowerCase.length property has the attribute
+ DontEnum
+es5id: 15.5.4.17_A8
+description: >
+ Checking if enumerating the
+ String.prototype.toLocaleLowerCase.length property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toLocaleLowerCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.toLocaleLowerCase.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.toLocaleLowerCase.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (var p in String.prototype.toLocaleLowerCase){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.toLocaleLowerCase){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A9.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A9.js
new file mode 100644
index 000000000..5efe5d9d0
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLocaleLowerCase.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.17_A9
+description: >
+ Checking if deleting the String.prototype.toLocaleLowerCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toLocaleLowerCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.toLocaleLowerCase.length) {
+ $ERROR('#1: delete String.prototype.toLocaleLowerCase.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLocaleLowerCase.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.toLocaleLowerCase.length; String.prototype.toLocaleLowerCase.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js
new file mode 100644
index 000000000..a1f314bd6
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLocaleUpperCase.length property has the attribute
+ ReadOnly
+es5id: 15.5.4.19_A10
+description: >
+ Checking if varying the String.prototype.toLocaleUpperCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.toLocaleUpperCase.length;
+
+String.prototype.toLocaleUpperCase.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLocaleUpperCase.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.toLocaleUpperCase.length; String.prototype.toLocaleUpperCase.length = function(){return "shifted";}; String.prototype.toLocaleUpperCase.length === __obj. Actual: '+String.prototype.toLocaleUpperCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A11.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A11.js
new file mode 100644
index 000000000..da53d2892
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the toLocaleUpperCase method is 0
+es5id: 15.5.4.19_A11
+description: Checking String.prototype.toLocaleUpperCase.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toLocaleUpperCase.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.toLocaleUpperCase.hasOwnProperty("length") return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLocaleUpperCase.length !== 0) {
+ $ERROR('#2: String.prototype.toLocaleUpperCase.length === 0. Actual: '+String.prototype.toLocaleUpperCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T1.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T1.js
new file mode 100644
index 000000000..e58f9b38a
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T1
+description: Arguments is true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toLocaleUpperCase() !== "TRUE") {
+ $ERROR('#1: __instance = new Object(true); __instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __instance.toLocaleUpperCase() === "TRUE". Actual: '+__instance.toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T10.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T10.js
new file mode 100644
index 000000000..6bcc86f58
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T10.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T10
+description: >
+ Call toLocaleUpperCase() function of object with overrode toString
+ function
+---*/
+
+var __obj = {toString:function(){return "\u0041b";}}
+__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toLocaleUpperCase() !=="AB") {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041b";}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase() ==="AB". Actual: '+__obj.toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T11.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T11.js
new file mode 100644
index 000000000..86266e92d
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T11.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T11
+description: >
+ Override toString function, toString throw exception, then call
+ toLocaleUpperCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}}
+__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toLocaleUpperCase();
+ $FAIL('#1: "var x = __obj.toLocaleUpperCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T12.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T12.js
new file mode 100644
index 000000000..7936b1529
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T12.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T12
+description: >
+ Override toString and valueOf functions, valueOf throw exception,
+ then call toLocaleUpperCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}
+__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toLocaleUpperCase();
+ $FAIL('#1: "var x = __obj.toLocaleUpperCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T13.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T13.js
new file mode 100644
index 000000000..3b1b61817
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T13.js
@@ -0,0 +1,28 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T13
+description: >
+ Override toString and valueOf functions, then call
+ toLocaleUpperCase() function for this object
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}
+__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toLocaleUpperCase() !=="1") {
+ $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase() ==="1". Actual: '+__obj.toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__obj.toLocaleUpperCase().length !== 1) {
+ $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase().length === 1. Actual: '+__obj.toLocaleUpperCase().length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T14.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T14.js
new file mode 100644
index 000000000..8c2104cc7
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T14.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T14
+description: Call toLocaleUpperCase() function for RegExp object
+---*/
+
+var __reg = new RegExp("abc");
+__reg.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__reg.toLocaleUpperCase() !== "/ABC/") {
+ $ERROR('#1: var __reg = new RegExp("abc"); __reg.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __reg.toLocaleUpperCase() === "/ABC/". Actual: '+__reg.toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T2.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T2.js
new file mode 100644
index 000000000..425c58fc1
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T2
+description: Instance is Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toLocaleUpperCase() !== "FALSE") {
+ $ERROR('#1: __instance = new Boolean; __instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __instance.toLocaleUpperCase() === "FALSE". Actual: '+__instance.toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T3.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T3.js
new file mode 100644
index 000000000..1de801a89
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T3.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T3
+description: Checking by using eval
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (eval("\"bj\"").toLocaleUpperCase() !== "BJ") {
+ $ERROR('#1: eval("\\"bj\\"").toLocaleUpperCase() === "BJ". Actual: '+eval("\"bj\"").toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T4.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T4.js
new file mode 100644
index 000000000..3cea1ebf0
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T4.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T4
+description: >
+ Call toLocaleUpperCase() function without arguments of string and
+ from empty string
+---*/
+
+var __lowerCase = "".toLocaleUpperCase();
+var __expected = "";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __lowerCase = "".toLocaleUpperCase(); __expected = ""; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __lowerCase = "".toLocaleUpperCase(); __expected = ""; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __lowerCase = "".toLocaleUpperCase(); __expected = ""; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__lowerCase[0]!==__expected[0]) {
+ $ERROR('#4: __lowerCase = "".toLocaleUpperCase(); __lowerCase[0]==='+__expected[0]+'. Actual: '+__lowerCase[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T5.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T5.js
new file mode 100644
index 000000000..f1da20120
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T5
+description: Call toLocaleUpperCase() function of function call
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" match(null) evaluates to match("null")
+if (function(){return "GnulLuNa"}().toLocaleUpperCase() !== "GNULLUNA") {
+ $ERROR('#1: function(){return "GnulLuNa"}().toLocaleUpperCase() === "GNULLUNA". Actual: '+function(){return "GnulLuNa"}().toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T6.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T6.js
new file mode 100644
index 000000000..5088fcb8d
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T6
+description: Call toLocaleUpperCase() function of Number.NEGATIVE_INFINITY
+---*/
+
+Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((Number.NEGATIVE_INFINITY).toLocaleUpperCase() !== "-INFINITY") {
+ $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; (Number.NEGATIVE_INFINITY).toLocaleUpperCase() === "-INFINITY". Actual: '+(Number.NEGATIVE_INFINITY).toLocaleUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T7.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T7.js
new file mode 100644
index 000000000..0c710d629
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T7
+description: Call toLocaleUpperCase() function of NaN
+---*/
+
+Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (NaN.toLocaleUpperCase()!== "NAN") {
+ $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; NaN.toLocaleUpperCase()=== "NAN". Actual: '+NaN.toLocaleUpperCase());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T8.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T8.js
new file mode 100644
index 000000000..968e66738
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T8.js
@@ -0,0 +1,14 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T8
+description: Call toLocaleUpperCase() function of Infinity
+---*/
+
+Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
+
+if (Infinity.toLocaleUpperCase()!== "INFINITY") {
+ $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; Infinity.toLocaleUpperCase()=== "INFINITY". Actual: '+Infinity.toLocaleUpperCase());
+}
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T9.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T9.js
new file mode 100644
index 000000000..debdee1dd
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A1_T9.js
@@ -0,0 +1,51 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase()
+es5id: 15.5.4.19_A1_T9
+description: Call toLocaleUpperCase() function of string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+var __lowerCase = new String(__obj).toLocaleUpperCase();
+
+var __expected ="UNDEFINED";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected ="UNDEFINED"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected ="UNDEFINED"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected ="UNDEFINED"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__lowerCase[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected ="UNDEFINED"; __lowerCase['+index+']==='+__expected[index]+'. Actual: '+__lowerCase[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A2_T1.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A2_T1.js
new file mode 100644
index 000000000..0782ca8ba
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A2_T1.js
@@ -0,0 +1,34 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ String.prototype.toLocaleUpperCase() return a string, but not a String
+ object
+es5id: 15.5.4.19_A2_T1
+description: Checking returned result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("Hello, WoRlD!".toLocaleUpperCase() !== "HELLO, WORLD!") {
+ $ERROR('#1: "Hello, WoRlD!".toLocaleUpperCase() === "HELLO, WORLD!". Actual: '+("Hello, WoRlD!".toLocaleUpperCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if ("Hello, WoRlD!".toLocaleUpperCase() !== String("HELLO, WORLD!")) {
+ $ERROR('#2: "Hello, WoRlD!".toLocaleUpperCase() === String("HELLO, WORLD!"). Actual: '+("Hello, WoRlD!".toLocaleUpperCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if ("Hello, WoRlD!".toLocaleUpperCase() ===new String("HELLO, WORLD!")) {
+ $ERROR('#3: "Hello, WoRlD!".toLocaleUpperCase() !== new String("HELLO, WORLD!"');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A6.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A6.js
new file mode 100644
index 000000000..498dbfaa5
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase has not prototype property
+es5id: 15.5.4.19_A6
+description: Checking String.prototype.toLocaleUpperCase.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.toLocaleUpperCase.prototype !== undefined) {
+ $ERROR('#1: String.prototype.toLocaleUpperCase.prototype === undefined. Actual: '+String.prototype.toLocaleUpperCase.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A7.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A7.js
new file mode 100644
index 000000000..609cc09ea
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A7.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLocaleUpperCase can't be used as constructor
+es5id: 15.5.4.19_A7
+description: >
+ Checking if creating the String.prototype.toLocaleUpperCase object
+ fails
+includes: [$FAIL.js]
+---*/
+
+var __FACTORY = String.prototype.toLocaleUpperCase;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: __FACTORY = String.prototype.toLocaleUpperCase; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.1: var __instance = new __FACTORY; Object has no construct lead a TypeError. Actual: ' + (e));
+ }
+}
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A8.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A8.js
new file mode 100644
index 000000000..0791e334c
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A8.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLocaleUpperCase.length property has the attribute
+ DontEnum
+es5id: 15.5.4.19_A8
+description: >
+ Checking if enumerating the
+ String.prototype.toLocaleUpperCase.length property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.toLocaleUpperCase.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.toLocaleUpperCase.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (var p in String.prototype.toLocaleUpperCase){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.toLocaleUpperCase){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A9.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A9.js
new file mode 100644
index 000000000..b17b2d8a2
--- /dev/null
+++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLocaleUpperCase.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.19_A9
+description: >
+ Checking if deleting the String.prototype.toLocaleUpperCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.toLocaleUpperCase.length) {
+ $ERROR('#1: delete String.prototype.toLocaleUpperCase.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLocaleUpperCase.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.toLocaleUpperCase.length; String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js
new file mode 100644
index 000000000..c502bbd51
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLowerCase.length property has the attribute
+ ReadOnly
+es5id: 15.5.4.16_A10
+description: >
+ Checking if varying the String.prototype.toLowerCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.toLowerCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.toLowerCase.length;
+
+String.prototype.toLowerCase.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLowerCase.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.toLowerCase.length; String.prototype.toLowerCase.length = function(){return "shifted";}; String.prototype.toLowerCase.length === __obj. Actual: '+String.prototype.toLowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A11.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A11.js
new file mode 100644
index 000000000..f05e554ca
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the toLowerCase method is 0
+es5id: 15.5.4.16_A11
+description: Checking String.prototype.toLowerCase.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toLowerCase.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.toLowerCase.hasOwnProperty("length") return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLowerCase.length !== 0) {
+ $ERROR('#2: String.prototype.toLowerCase.length === 0. Actual: '+String.prototype.toLowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T1.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T1.js
new file mode 100644
index 000000000..62a744bc9
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T1
+description: Arguments is true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toLowerCase() !== "true") {
+ $ERROR('#1: __instance = new Object(true); __instance.toLowerCase = String.prototype.toLowerCase; __instance.toLowerCase() === "true". Actual: '+__instance.toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T10.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T10.js
new file mode 100644
index 000000000..8e5b25c86
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T10.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T10
+description: >
+ Call toLowerCase() function of object with overrode toString
+ function
+---*/
+
+var __obj = {toString:function(){return "\u0041B";}}
+__obj.toLowerCase = String.prototype.toLowerCase;
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toLowerCase() !=="ab") {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041B";}}; __obj.toLowerCase = String.prototype.toLowerCase; __obj.toLowerCase() ==="ab". Actual: '+__obj.toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T11.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T11.js
new file mode 100644
index 000000000..d167a5be4
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T11.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T11
+description: >
+ Override toString function, toString throw exception, then call
+ toLowerCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}}
+__obj.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toLowerCase();
+ $FAIL('#1: "var x = __obj.toLowerCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T12.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T12.js
new file mode 100644
index 000000000..d38a9a0bb
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T12.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T12
+description: >
+ Override toString and valueOf functions, valueOf throw exception,
+ then call toLowerCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}
+__obj.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toLowerCase();
+ $FAIL('#1: "var x = __obj.toLowerCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T13.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T13.js
new file mode 100644
index 000000000..2b3e12789
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T13.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T13
+description: >
+ Override toString and valueOf functions, then call toLowerCase()
+ function for this object
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}
+__obj.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toLowerCase() !=="1") {
+ $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLowerCase = String.prototype.toLowerCase; __obj.toLowerCase() ==="1". Actual: '+__obj.toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__obj.toLowerCase().length !== 1) {
+ $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLowerCase = String.prototype.toLowerCase; __obj.toLowerCase().length === 1. Actual: '+__obj.toLowerCase().length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T14.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T14.js
new file mode 100644
index 000000000..5693649fa
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T14.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T14
+description: Call toLowerCase() function for RegExp object
+---*/
+
+var __reg = new RegExp("ABC");
+__reg.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__reg.toLowerCase() !== "/abc/") {
+ $ERROR('#1: var __reg = new RegExp("ABC"); __reg.toLowerCase = String.prototype.toLowerCase; __reg.toLowerCase() === "/abc/". Actual: '+__reg.toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js
new file mode 100644
index 000000000..f9619c8a8
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T2
+description: Instance is Boolean object
+---*/
+
+__instance = new Boolean;
+
+__instance.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toLowerCase() !== "false") {
+ $ERROR('#1: __instance = new Boolean; __instance.toLowerCase = String.prototype.toLowerCase; __instance.toLowerCase() === "false". Actual: '+__instance.toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T3.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T3.js
new file mode 100644
index 000000000..35a215e6f
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T3.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T3
+description: Checking by using eval
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (eval("\"BJ\"").toLowerCase() !== "bj") {
+ $ERROR('#1: eval("\\"BJ\\"").toLowerCase() === "bj". Actual: '+eval("\"BJ\"").toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T4.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T4.js
new file mode 100644
index 000000000..145ad95bd
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T4.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T4
+description: >
+ Call toLowerCase() function without arguments of string and from
+ empty string
+---*/
+
+var __lowerCase = "".toLowerCase();
+
+var __expected = "";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __lowerCase = "".toLowerCase(); __expected = ""; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __lowerCase = "".toLowerCase(); __expected = ""; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __lowerCase = "".toLowerCase(); __expected = ""; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__lowerCase[0]!==__expected[0]) {
+ $ERROR('#4: __lowerCase = "".toLowerCase(); __expected = ""; __lowerCase[0]==='+__expected[0]+'. Actual: '+__lowerCase[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T5.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T5.js
new file mode 100644
index 000000000..0082c8caf
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T5
+description: Call toLowerCase() function for function call
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" match(null) evaluates to match("null")
+if (function(){return "GnulLuNa"}().toLowerCase() !== "gnulluna") {
+ $ERROR('#1: function(){return "GnulLuNa"}().toLowerCase() === "gnulluna". Actual: '+function(){return "GnulLuNa"}().toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T6.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T6.js
new file mode 100644
index 000000000..915b9bc6a
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T6
+description: Call toLowerCase() function of Number.NEGATIVE_INFINITY
+---*/
+
+Number.prototype.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((Number.NEGATIVE_INFINITY).toLowerCase() !== "-infinity") {
+ $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; (Number.NEGATIVE_INFINITY).toLowerCase() === "-infinity". Actual: '+(Number.NEGATIVE_INFINITY).toLowerCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T7.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T7.js
new file mode 100644
index 000000000..efb0be3d4
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T7
+description: Call toLowerCase() function of NaN
+---*/
+
+Number.prototype.toLowerCase = String.prototype.toLowerCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (NaN.toLowerCase()!== "nan") {
+ $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; NaN.toLowerCase()=== "nan". Actual: '+NaN.toLowerCase());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T8.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T8.js
new file mode 100644
index 000000000..12d8e4982
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T8.js
@@ -0,0 +1,14 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T8
+description: Call toLowerCase() function of Infinity
+---*/
+
+Number.prototype.toLowerCase = String.prototype.toLowerCase;
+
+if (Infinity.toLowerCase()!== "infinity") {
+ $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; Infinity.toLowerCase()=== "infinity". Actual: '+Infinity.toLowerCase());
+}
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T9.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T9.js
new file mode 100644
index 000000000..713b5ced9
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A1_T9.js
@@ -0,0 +1,51 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase()
+es5id: 15.5.4.16_A1_T9
+description: Call toLowerCase() function of string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+var __lowerCase = new String(__obj).toLowerCase();
+
+var __expected ="undefined";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected ="undefined"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected ="undefined"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected ="undefined"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__lowerCase[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected ="undefined"; __lowerCase['+index+']==='+__expected[index]+'. Actual: '+__lowerCase[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A2_T1.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A2_T1.js
new file mode 100644
index 000000000..23824d463
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A2_T1.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase() return a string, but not a String object
+es5id: 15.5.4.16_A2_T1
+description: Checking returned result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("Hello, WoRlD!".toLowerCase() !== "hello, world!") {
+ $ERROR('#1: "Hello, WoRlD!".toLowerCase() === "hello, world!". Actual: '+("Hello, WoRlD!".toLowerCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if ("Hello, WoRlD!".toLowerCase() !== String("hello, world!")) {
+ $ERROR('#2: "Hello, WoRlD!".toLowerCase() === String("hello, world!"). Actual: '+("Hello, WoRlD!".toLowerCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if ("Hello, WoRlD!".toLowerCase() ===new String("hello, world!")) {
+ $ERROR('#3: "Hello, WoRlD!".toLowerCase() !== new String("hello, world!")');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A6.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A6.js
new file mode 100644
index 000000000..4504be730
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase has not prototype property
+es5id: 15.5.4.16_A6
+description: Checking String.prototype.toLowerCase.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.toLowerCase.prototype !== undefined) {
+ $ERROR('#1: String.prototype.toLowerCase.prototype === undefined. Actual: '+String.prototype.toLowerCase.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A7.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A7.js
new file mode 100644
index 000000000..87deaeff8
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toLowerCase can't be used as constructor
+es5id: 15.5.4.16_A7
+description: Checking if creating the String.prototype.toLowerCase object fails
+includes: [$FAIL.js]
+---*/
+
+var __FACTORY = String.prototype.toLowerCase;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: var __FACTORY = String.prototype.toLowerCase; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.1: var __FACTORY = String.prototype.toLowerCase; "__instance = new __FACTORY" throws a TypeError. Actual: ' + (e));
+ }
+};
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js
new file mode 100644
index 000000000..a8439e552
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A8.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLowerCase.length property has the attribute
+ DontEnum
+es5id: 15.5.4.16_A8
+description: >
+ Checking if enumerating the String.prototype.toLowerCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toLowerCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.toLowerCase.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.toLowerCase.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.toLowerCase){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.toLowerCase){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A9.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A9.js
new file mode 100644
index 000000000..ff157981b
--- /dev/null
+++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toLowerCase.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.16_A9
+description: >
+ Checking if deleting the String.prototype.toLowerCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toLowerCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.toLowerCase.length) {
+ $ERROR('#1: delete String.prototype.toLowerCase.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toLowerCase.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.toLowerCase.length; String.prototype.toLowerCase.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T1.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T1.js
new file mode 100644
index 000000000..b83c5b183
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toString() returns this string value
+es5id: 15.5.4.2_A1_T1
+description: Create new String(number) and check it`s method toString()
+---*/
+
+var __string__obj = new String(1);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.toString() !== ""+1) {
+ $ERROR('#1: __string__obj = new String(1); __string__obj.toString() === ""+1. Actual: __string__obj.toString() ==='+__string__obj.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T2.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T2.js
new file mode 100644
index 000000000..568f1a93f
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toString() returns this string value
+es5id: 15.5.4.2_A1_T2
+description: Create new String(boolean) and check it`s method toString()
+---*/
+
+var __string__obj = new String(true);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.toString() !== ""+true) {
+ $ERROR('#1: __string__obj = new String(true); __string__obj.toString() === ""+true. Actual: __string__obj.toString() ==='+__string__obj.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T3.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T3.js
new file mode 100644
index 000000000..2720ba435
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T3.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toString() returns this string value
+es5id: 15.5.4.2_A1_T3
+description: Create new String(string) and check it`s method toString()
+---*/
+
+var __string__obj = new String("metal");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.toString() !== "metal") {
+ $ERROR('#1: __string__obj = new String("metal"); __string__obj.toString() === "metal". Actual: __string__obj.toString() ==='+__string__obj.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T4.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T4.js
new file mode 100644
index 000000000..933030ef5
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A1_T4.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toString() returns this string value
+es5id: 15.5.4.2_A1_T4
+description: Create new String(function(){}()) and check it`s method toString()
+---*/
+
+var __string__obj = new String(function(){}());
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.toString() !== "undefined") {
+ $ERROR('#1: __string__obj = new String(function(){}()); __string__obj.toString() === "undefined". Actual: __string__obj.toString() ==='+__string__obj.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A2_T1.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A2_T1.js
new file mode 100644
index 000000000..018af174b
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A2_T1.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The toString function is not generic; it throws a TypeError exception if
+ its this value is not a String object. Therefore, it cannot be
+ transferred to other kinds of objects for use as a method
+es5id: 15.5.4.2_A2_T1
+description: Checking if creating variable String.prototype.toString fails
+includes: [$FAIL.js]
+---*/
+
+var __toString = String.prototype.toString;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __toString !== "function") {
+ $ERROR('#1: __toString = String.prototype.toString; typeof __toString === "function". Actual: typeof __toString ==='+typeof __toString );
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ var x = __toString();
+ $FAIL('#2: "__toString = String.prototype.toString; var x = __toString();" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#2.1: "__toString = String.prototype.toString; var x = __toString();" lead to throwing exception. Exception is instance of TypeError. Actual: exception is '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A2_T2.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A2_T2.js
new file mode 100644
index 000000000..3f71cc5dc
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A2_T2.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The toString function is not generic; it throws a TypeError exception if
+ its this value is not a String object. Therefore, it cannot be
+ transferred to other kinds of objects for use as a method
+es5id: 15.5.4.2_A2_T2
+description: Checking if creating the object String.prototype.toString fails
+includes: [$FAIL.js]
+---*/
+
+var __obj={toString : String.prototype.toString};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __obj["toString"] !== "function") {
+ $ERROR('#1: var __obj={toString : String.prototype.toString}; typeof __obj["toString"] === "function". Actual: typeof __obj["toString"] ==='+typeof __obj["toString"] );
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ var x = (__obj == 1);
+ $FAIL('#2: "var x = (__obj == 1)" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#2.1: Exception is instance of TypeError. Actual: exception is '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A3_T1.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A3_T1.js
new file mode 100644
index 000000000..51b235fe1
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A3_T1.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toString() is equal String.prototype.valueOf()
+es5id: 15.5.4.2_A3_T1
+description: >
+ Create new String() with various arguments and compare returned
+ results of toString() and valueOf()
+---*/
+
+//CHECK#1
+var str = new String();
+if(!(str.valueOf() == str.toString()))
+ $ERROR('#1: str = new String(),str.valueOf() == str.toString()');
+
+//CHECK#2
+str = new String(true);
+if(!(str.valueOf() == str.toString()))
+ $ERROR('#2: str = new String(true),str.valueOf() == str.toString()');
+
+//CHECK#3
+str = new String(false);
+if(!(str.valueOf() == str.toString()))
+ $ERROR('#3: str = new String(false),str.valueOf() == str.toString()');
+
+//CHECK#4
+str = new String(Math.PI);
+if(!(str.valueOf() == str.toString()))
+ $ERROR('#4: str = new String(Math.PI),str.valueOf() == str.toString()');
diff --git a/test/built-ins/String/prototype/toString/S15.5.4.2_A4_T1.js b/test/built-ins/String/prototype/toString/S15.5.4.2_A4_T1.js
new file mode 100644
index 000000000..f4b51a90a
--- /dev/null
+++ b/test/built-ins/String/prototype/toString/S15.5.4.2_A4_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toString have length property and it is equal 0
+es5id: 15.5.4.2_A4_T1
+description: Checking String.prototype.toString.length property
+---*/
+
+//CHECK#1
+if (String.prototype.toString.hasOwnProperty('length')!==true){
+ $ERROR('#1: String.prototype.toString.hasOwnProperty(\'length\')===true. Actual: '+String.prototype.toString.hasOwnProperty('length'));
+}
+else{
+//CHECK#2
+if (String.prototype.toString.length!==0)
+ $ERROR('#2: String.prototype.toString.length===0. Actual: String.prototype.toString.length==='+String.prototype.toString.length);
+}
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js
new file mode 100644
index 000000000..af453646f
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js
@@ -0,0 +1,33 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toUpperCase.length property has the attribute
+ ReadOnly
+es5id: 15.5.4.18_A10
+description: >
+ Checking if varying the String.prototype.toUpperCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {
+ $FAIL('#1: String.prototype.toUpperCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var __obj = String.prototype.toUpperCase.length;
+
+String.prototype.toUpperCase.length = function(){return "shifted";};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toUpperCase.length !== __obj) {
+ $ERROR('#2: __obj = String.prototype.toUpperCase.length; String.prototype.toUpperCase.length = function(){return "shifted";}; String.prototype.toUpperCase.length === __obj. Actual: '+String.prototype.toUpperCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A11.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A11.js
new file mode 100644
index 000000000..3747a63f4
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A11.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The length property of the toUpperCase method is 0
+es5id: 15.5.4.18_A11
+description: Checking String.prototype.toUpperCase.length
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!(String.prototype.toUpperCase.hasOwnProperty("length"))) {
+ $ERROR('#1: String.prototype.toUpperCase.hasOwnProperty("length") return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty("length"));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toUpperCase.length !== 0) {
+ $ERROR('#2: String.prototype.toUpperCase.length === 0. Actual: '+String.prototype.toUpperCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T1.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T1.js
new file mode 100644
index 000000000..951eafd2c
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T1.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T1
+description: Arguments is true, and instance is object
+---*/
+
+var __instance = new Object(true);
+
+__instance.toUpperCase = String.prototype.toUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toUpperCase() !== "TRUE") {
+ $ERROR('#1: __instance = new Object(true); __instance.toUpperCase = String.prototype.toUpperCase; __instance.toUpperCase() === "TRUE". Actual: '+__instance.toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T10.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T10.js
new file mode 100644
index 000000000..0da16d896
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T10.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T10
+description: >
+ Call toUpperCase() function of object with overrode toString
+ function
+---*/
+
+var __obj = {toString:function(){return "\u0041b";}}
+__obj.toUpperCase = String.prototype.toUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toUpperCase() !=="AB") {
+ $ERROR('#1: var __obj = {toString:function(){return "\u0041b";}}; __obj.toUpperCase = String.prototype.toUpperCase; __obj.toUpperCase() ==="AB". Actual: '+__obj.toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T11.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T11.js
new file mode 100644
index 000000000..5a8a2dd02
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T11.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T11
+description: >
+ Override toString function, toString throw exception, then call
+ toUpperCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){throw "intostr";}}
+__obj.toUpperCase = String.prototype.toUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toUpperCase();
+ $FAIL('#1: "var x = __obj.toUpperCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T12.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T12.js
new file mode 100644
index 000000000..d67c6adaf
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T12.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T12
+description: >
+ Override toString and valueOf functions, valueOf throw exception,
+ then call toUpperCase() function for this object
+includes: [$FAIL.js]
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}
+__obj.toUpperCase = String.prototype.toUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var x = __obj.toUpperCase();
+ $FAIL('#1: "var x = __obj.toUpperCase()" lead to throwing exception');
+} catch (e) {
+ if (e!=="intostr") {
+ $ERROR('#1.1: Exception === "intostr". Actual: '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T13.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T13.js
new file mode 100644
index 000000000..f3c9080f8
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T13.js
@@ -0,0 +1,29 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T13
+description: >
+ Override toString and valueOf functions, then call toUpperCase()
+ function for this object
+---*/
+
+var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}
+__obj.toUpperCase = String.prototype.toUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__obj.toUpperCase() !=="1") {
+ $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toUpperCase = String.prototype.toUpperCase; __obj.toUpperCase() ==="1". Actual: '+__obj.toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__obj.toUpperCase().length !== 1) {
+ $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toUpperCase = String.prototype.toUpperCase; __obj.toUpperCase().length === 1. Actual: '+__obj.toUpperCase().length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T14.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T14.js
new file mode 100644
index 000000000..38d64db46
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T14.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T14
+description: Call toUpperCase() function of RegExp object
+---*/
+
+var __reg = new RegExp("abc");
+__reg.toUpperCase = String.prototype.toUpperCase;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__reg.toUpperCase() !== "/ABC/") {
+ $ERROR('#1: var __reg = new RegExp("abc"); __reg.toUpperCase = String.prototype.toUpperCase; __reg.toUpperCase() === "/ABC/". Actual: '+__reg.toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T2.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T2.js
new file mode 100644
index 000000000..e07861a9e
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T2
+description: Instance is Boolean object
+---*/
+
+var __instance = new Boolean;
+
+__instance.toUpperCase = String.prototype.toUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__instance.toUpperCase() !== "FALSE") {
+ $ERROR('#1: __instance = new Boolean; __instance.toUpperCase = String.prototype.toUpperCase; __instance.toUpperCase() === "FALSE". Actual: '+__instance.toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T3.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T3.js
new file mode 100644
index 000000000..127023d0d
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T3.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T3
+description: Checking by using eval
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (eval("\"bj\"").toUpperCase() !== "BJ") {
+ $ERROR('#1: eval("\\"bj\\"").toUpperCase() === "BJ". Actual: '+eval("\"bj\"").toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T4.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T4.js
new file mode 100644
index 000000000..a0f71334a
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T4.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T4
+description: >
+ Call toUpperCase() function without arguments of string and from
+ empty string
+---*/
+
+var __lowerCase = "".toUpperCase();
+
+var __expected = "";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__lowerCase.length !== __expected.length) {
+ $ERROR('#1: __lowerCase = "".toUpperCase(); __expected = ""; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__lowerCase.index !== __expected.index) {
+ $ERROR('#2: __lowerCase = "".toUpperCase(); __expected = ""; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__lowerCase.input !== __expected.input) {
+ $ERROR('#3: __lowerCase = "".toUpperCase(); __expected = ""; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (__lowerCase[0]!==__expected[0]) {
+ $ERROR('#4: __lowerCase = "".toUpperCase(); __expected = ""; __lowerCase[0]==='+__expected[0]+'. Actual: '+__lowerCase[0]);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T5.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T5.js
new file mode 100644
index 000000000..1e179135b
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T5.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T5
+description: Call toUpperCase() function of function call
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(null) evaluates to "null" match(null) evaluates to match("null")
+if (function(){return "GnulLuNa"}().toUpperCase() !== "GNULLUNA") {
+ $ERROR('#1: function(){return "GnulLuNa"}().toUpperCase() === "GNULLUNA". Actual: '+function(){return "GnulLuNa"}().toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T6.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T6.js
new file mode 100644
index 000000000..85fc4f0e3
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T6.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T6
+description: Call toUpperCase() function of Number.NEGATIVE_INFINITY
+---*/
+
+Number.prototype.toUpperCase = String.prototype.toUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ((Number.NEGATIVE_INFINITY).toUpperCase() !== "-INFINITY") {
+ $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; (Number.NEGATIVE_INFINITY).toUpperCase() === "-INFINITY". Actual: '+(Number.NEGATIVE_INFINITY).toUpperCase() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T7.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T7.js
new file mode 100644
index 000000000..d5ea87140
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T7.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T7
+description: Call toUpperCase() function of NaN
+---*/
+
+Number.prototype.toUpperCase = String.prototype.toUpperCase;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (NaN.toUpperCase()!== "NAN") {
+ $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; NaN.toUpperCase()=== "NAN". Actual: '+NaN.toUpperCase());
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T8.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T8.js
new file mode 100644
index 000000000..289d7d1d7
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T8.js
@@ -0,0 +1,14 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T8
+description: Call toUpperCase() function of Infinity;
+---*/
+
+Number.prototype.toUpperCase = String.prototype.toUpperCase;
+
+if (Infinity.toUpperCase()!== "INFINITY") {
+ $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; Infinity.toUpperCase()=== "INFINITY". Actual: '+Infinity.toUpperCase());
+}
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T9.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T9.js
new file mode 100644
index 000000000..10a3f1b23
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A1_T9.js
@@ -0,0 +1,51 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase()
+es5id: 15.5.4.18_A1_T9
+description: Call toUpperCase() function of string object
+---*/
+
+var __obj = {
+ valueOf:function(){},
+ toString:void 0
+};
+
+var __upperCase = new String(__obj).toUpperCase();
+
+var __expected ="UNDEFINED";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__upperCase.length !== __expected.length) {
+ $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected ="UNDEFINED"; __upperCase.length === __expected.length. Actual: '+__upperCase.length );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__upperCase.index !== __expected.index) {
+ $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected ="UNDEFINED"; __upperCase.index === __expected.index. Actual: '+__upperCase.index );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__upperCase.input !== __expected.input) {
+ $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected ="UNDEFINED"; __upperCase.input === __expected.input. Actual: '+__upperCase.input );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+for(var index=0; index<__expected.length; index++) {
+ if (__upperCase[index]!==__expected[index]) {
+ $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected ="UNDEFINED"; __upperCase['+index+']==='+__expected[index]+'. Actual: '+__upperCase[index]);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A2_T1.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A2_T1.js
new file mode 100644
index 000000000..b6b76ea34
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A2_T1.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase() return a string, but not a String object
+es5id: 15.5.4.18_A2_T1
+description: Checking returned result
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ("Hello, WoRlD!".toUpperCase() !== "HELLO, WORLD!") {
+ $ERROR('#1: "Hello, WoRlD!".toUpperCase() === "HELLO, WORLD!". Actual: '+("Hello, WoRlD!".toUpperCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if ("Hello, WoRlD!".toUpperCase() !== String("HELLO, WORLD!")) {
+ $ERROR('#2: "Hello, WoRlD!".toUpperCase() === String("HELLO, WORLD!"). Actual: '+("Hello, WoRlD!".toUpperCase()) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if ("Hello, WoRlD!".toUpperCase() ===new String("HELLO, WORLD!")) {
+ $ERROR('#3: "Hello, WoRlD!".toUpperCase() !== new String("HELLO, WORLD!")');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A6.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A6.js
new file mode 100644
index 000000000..e870a1a9b
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A6.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase has not prototype property
+es5id: 15.5.4.18_A6
+description: Checking String.prototype.toUpperCase.prototype
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (String.prototype.toUpperCase.prototype !== undefined) {
+ $ERROR('#1: String.prototype.toUpperCase.prototype === undefined. Actual: '+String.prototype.toUpperCase.prototype );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A7.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A7.js
new file mode 100644
index 000000000..fc9aae081
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A7.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.toUpperCase can't be used as constructor
+es5id: 15.5.4.18_A7
+description: Checking if creating the String.prototype.toUpperCase object fails
+includes: [$FAIL.js]
+---*/
+
+var __FACTORY = String.prototype.toUpperCase;
+
+try {
+ var __instance = new __FACTORY;
+ $FAIL('#1: var __FACTORY = String.prototype.toUpperCase; "__instance = new __FACTORY" lead to throwing exception');
+} catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1.1: var __FACTORY = String.prototype.toUpperCase; "__instance = new __FACTORY" throw a TypeError. Actual: ' + (e));
+ }
+}
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js
new file mode 100644
index 000000000..15e505379
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A8.js
@@ -0,0 +1,44 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toUpperCase.length property has the attribute
+ DontEnum
+es5id: 15.5.4.18_A8
+description: >
+ Checking if enumerating the String.prototype.toUpperCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toUpperCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (String.prototype.toUpperCase.propertyIsEnumerable('length')) {
+ $ERROR('#1: String.prototype.toUpperCase.propertyIsEnumerable(\'length\') return false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// CHECK#2
+var count=0;
+
+for (p in String.prototype.toUpperCase){
+ if (p==="length") count++;
+}
+
+if (count !== 0) {
+ $ERROR('#2: count=0; for (p in String.prototype.toUpperCase){if (p==="length") count++;}; count === 0. Actual: '+count );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A9.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A9.js
new file mode 100644
index 000000000..2409b5417
--- /dev/null
+++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A9.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The String.prototype.toUpperCase.length property does not have the
+ attribute DontDelete
+es5id: 15.5.4.18_A9
+description: >
+ Checking if deleting the String.prototype.toUpperCase.length
+ property fails
+includes: [$FAIL.js]
+---*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#0
+if (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {
+ $FAIL('#0: String.prototype.toUpperCase.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!delete String.prototype.toUpperCase.length) {
+ $ERROR('#1: delete String.prototype.toUpperCase.length return true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (String.prototype.toUpperCase.hasOwnProperty('length')) {
+ $FAIL('#2: delete String.prototype.toUpperCase.length; String.prototype.toUpperCase.hasOwnProperty(\'length\') return false. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-0-1.js b/test/built-ins/String/prototype/trim/15.5.4.20-0-1.js
new file mode 100644
index 000000000..2a069ab1a
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-0-1.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-0-1
+description: String.prototype.trim must exist as a function
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var f = String.prototype.trim;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-0-2.js b/test/built-ins/String/prototype/trim/15.5.4.20-0-2.js
new file mode 100644
index 000000000..c1d7da170
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-0-2.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-0-2
+description: String.prototype.trim must exist as a function taking 0 parameters
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if (String.prototype.trim.length === 0) {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-1.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-1.js
new file mode 100644
index 000000000..99f3500c9
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-1.js
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-1
+description: String.prototype.trim throws TypeError when string is undefined
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ String.prototype.trim.call(undefined);
+ return false;
+ }
+ catch(e)
+ {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-2.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-2.js
new file mode 100644
index 000000000..a4d4a28b9
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-2.js
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-2
+description: String.prototype.trim throws TypeError when string is null
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ String.prototype.trim.call(null);
+ return false;
+ }
+ catch(e)
+ {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js
new file mode 100644
index 000000000..766d9a37c
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-3
+description: String.prototype.trim works for primitive type boolean
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ if(String.prototype.trim.call(true) == "true")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js
new file mode 100644
index 000000000..93f472457
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-4
+description: String.prototype.trim works for primitive type number
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ if(String.prototype.trim.call(0) == "0")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js
new file mode 100644
index 000000000..459bbbeba
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-5
+description: String.prototype.trim works for an Object
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ if(String.prototype.trim.call({})=="[object Object]")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js
new file mode 100644
index 000000000..4b3cb2250
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-6
+description: String.prototype.trim works for an String
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ if(String.prototype.trim.call(new String()) == "")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js
new file mode 100644
index 000000000..33e35d11d
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-7
+description: String.prototype.trim works for a primitive string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ try
+ {
+ if(String.prototype.trim.call("abc") === "abc")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-8.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-8.js
new file mode 100644
index 000000000..dcbd5c74f
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-8.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-8
+description: >
+ String.prototype.trim works for a primitive string (value is '
+ abc')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var strObj = String(" abc");
+ return "abc" === strObj.trim() && strObj.toString() === " abc";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-9.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-9.js
new file mode 100644
index 000000000..ee04f756f
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-9.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-1-9
+description: >
+ String.prototype.trim works for a String object which value is
+ undefined
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var strObj = new String(undefined);
+ return strObj.trim() === "undefined";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js
new file mode 100644
index 000000000..eae2b148b
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-1
+description: >
+ String.prototype.trim - argument 'this' is a boolean whose value
+ is false
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(false) === "false";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js
new file mode 100644
index 000000000..3c1bd5d73
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-10
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is +Infinity)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(+Infinity) === "Infinity";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js
new file mode 100644
index 000000000..cbdef3ecd
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-11
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is -Infinity)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(-Infinity) === "-Infinity";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js
new file mode 100644
index 000000000..dbe90c8d4
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-12
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1(following 20 zeros))
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(100000000000000000000) === "100000000000000000000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js
new file mode 100644
index 000000000..a711a4904
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-13
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1(following 21 zeros))
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1000000000000000000000) === "1e+21";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js
new file mode 100644
index 000000000..ed0281f08
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-14
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1(following 22 zeros))
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(10000000000000000000000) === "1e+22";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js
new file mode 100644
index 000000000..768706813
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-15
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1e+20)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1e+20) === "100000000000000000000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js
new file mode 100644
index 000000000..16150f83e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-16
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to string (value is 1e+21)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1e+21) === "1e+21";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js
new file mode 100644
index 000000000..dc77bfb1c
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-17
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to string (value is 1e+22)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1e+22) === "1e+22";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js
new file mode 100644
index 000000000..4d18fb640
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-18
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 0.000001)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(0.000001) === "0.000001";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js
new file mode 100644
index 000000000..ff84b698a
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-19
+description: >
+ String.prototype.trim - argument argument 'this' is a number that
+ converts to a string (value is 0.0000001)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(0.0000001) === "1e-7";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js
new file mode 100644
index 000000000..0714f532e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-2
+description: >
+ String.prototype.trim - argument 'this' is a boolean whose value
+ is true
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(true) === "true";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js
new file mode 100644
index 000000000..4160752cb
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-20
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 0.00000001)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(0.00000001) === "1e-8";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js
new file mode 100644
index 000000000..add279a61
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-21
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1e-7)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1e-7) === "1e-7";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js
new file mode 100644
index 000000000..2a539a2ae
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-22
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1e-6)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1e-6) === "0.000001";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js
new file mode 100644
index 000000000..0ecdbd5f3
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-23
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1e-5)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(1e-5) === "0.00001";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js
new file mode 100644
index 000000000..1cbb24d37
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-24
+description: >
+ String.prototype.trim - argument 'this' is an integer that
+ converts to a string (value is 123)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(123) === "123";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js
new file mode 100644
index 000000000..8f28a40e2
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-25
+description: >
+ String.prototype.trim - argument 'this' is a decimal that converts
+ to a string (value is 123.456)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(123.456) === "123.456";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js
new file mode 100644
index 000000000..bea1f77ea
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-26
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 1(following 20 zeros).123)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(100000000000000000000.123) === "100000000000000000000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js
new file mode 100644
index 000000000..da3aabead
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-27
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 123.1234567)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(123.1234567) === "123.1234567";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js
new file mode 100644
index 000000000..21cce1ccb
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-28
+description: String.prototype.trim - argument 'this' is an empty string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call("") === "";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js
new file mode 100644
index 000000000..eef87a904
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-29
+description: >
+ String.prototype.trim - argument 'this' is a string(value is 'AB
+ \cd')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call("AB\n\\cd") === "AB\n\\cd";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js
new file mode 100644
index 000000000..36899a2b0
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-3
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is NaN)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(NaN) === "NaN";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js
new file mode 100644
index 000000000..fba75e595
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-30
+description: >
+ String.prototype.trim - argument 'this' is a string(value is
+ 'undefined')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call("undefined") === "undefined";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js
new file mode 100644
index 000000000..81d5f3490
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-31
+description: >
+ String.prototype.trim - argument 'this' is a string(value is
+ 'null')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call("null") === "null";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js
new file mode 100644
index 000000000..73e242f73
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-32
+description: >
+ String.prototype.trim - argument 'this' is a string(value is
+ '123#$%abc')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call("123#$%abc") === "123#$%abc";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js
new file mode 100644
index 000000000..1a34338a5
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-33
+description: String.prototype.trim - argument 'this' is a string(value is '1')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call("1") === "1";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js
new file mode 100644
index 000000000..a6f3ba4e0
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-34
+description: >
+ String.prototype.trim - 'this' is an array that converts to a
+ string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return (String.prototype.trim.call([1]) === '1');
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js
new file mode 100644
index 000000000..df4aa2ad4
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-35
+description: >
+ String.prototype.trim - 'this' is a String Object that converts to
+ a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return (String.prototype.trim.call(new String("abc")) === "abc");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js
new file mode 100644
index 000000000..46a5721d9
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-36
+description: >
+ String.prototype.trim - 'this' is a Boolean Object that converts
+ to a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return (String.prototype.trim.call(new Boolean(false)) === "false");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js
new file mode 100644
index 000000000..6e2189247
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-37
+description: >
+ String.prototype.trim - 'this' is a Number Object that converts to
+ a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return (String.prototype.trim.call(new Number(123)) === "123");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-38.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-38.js
new file mode 100644
index 000000000..4ee9b274f
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-38.js
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-38
+description: >
+ String.prototype.trim - 'this' is an object which has an own
+ toString method
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var obj = {
+ toString: function () {
+ return "abc";
+ }
+ };
+
+ return (String.prototype.trim.call(obj) === "abc");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-39.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-39.js
new file mode 100644
index 000000000..2ec9f3fa2
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-39.js
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-39
+description: >
+ String.prototype.trim - 'this' is an object which has an own
+ valueOf method
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var obj = {
+ valueOf: function () {
+ return "abc";
+ }
+ };
+
+ return (String.prototype.trim.call(obj) === "[object Object]");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js
new file mode 100644
index 000000000..ab9c50668
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-4
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is 0)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(0) === "0";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-40.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-40.js
new file mode 100644
index 000000000..19c2d6138
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-40.js
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-40
+description: >
+ String.prototype.trim - 'this' is an object that has an own
+ toString method that returns an object and valueOf method that
+ returns a primitive value
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+ var obj = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return "abc";
+ }
+ };
+ return (String.prototype.trim.call(obj) === "abc") && valueOfAccessed && toStringAccessed;
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-41.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-41.js
new file mode 100644
index 000000000..0c932a71c
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-41.js
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-41
+description: >
+ String.prototype.trim - 'this' is an object which has an own
+ toString and valueOf method.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+ var obj = {
+ toString: function () {
+ toStringAccessed = true;
+ return "abc";
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return "cef";
+ }
+ };
+ return (String.prototype.trim.call(obj) === "abc") && !valueOfAccessed && toStringAccessed;
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-42.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-42.js
new file mode 100644
index 000000000..bc4c3f236
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-42.js
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-42
+description: >
+ String.prototype.trim - TypeError exception was thrown when
+ 'this' is an object that both toString and valueOf wouldn't return
+ primitive value.
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+ var obj = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ };
+ try {
+ String.prototype.trim.call(obj);
+ return false;
+ } catch (e) {
+ return valueOfAccessed && toStringAccessed && (e instanceof TypeError);
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-43.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-43.js
new file mode 100644
index 000000000..97521b6dd
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-43.js
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-43
+description: >
+ String.prototype.trim - 'this' is an object with an own valueOf
+ and inherited toString methods with hint string, verify inherited
+ toString method will be called first
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ toString: function () {
+ toStringAccessed = true;
+ return "abc";
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.valueOf = function () {
+ valueOfAccessed = true;
+ return "efg";
+ };
+ return (String.prototype.trim.call(child) === "abc") && toStringAccessed && !valueOfAccessed;
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-44.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-44.js
new file mode 100644
index 000000000..526552d2b
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-44.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-44
+description: >
+ String.prototype.trim - 'this' is a string that contains east
+ Asian characters (value is 'SD咕噜')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var str = "SD咕噜";
+ return str.trim() === str;
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-45.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-45.js
new file mode 100644
index 000000000..693b48ea1
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-45.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-45
+description: >
+ String.prototype.trim - 'this' is a string that contains white
+ space, character, number, object and null characters
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var str = "abc" + " " + 123 + " " + {} + " " + "\u0000";
+ var str1 = " " + str + " ";
+ return str1.trim() === str;
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-46.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-46.js
new file mode 100644
index 000000000..ba67173cd
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-46.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-46
+description: >
+ String.prototype.trim - 'this' is a Function Object that converts
+ to a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var funObj = function () { return arguments; };
+ return typeof(String.prototype.trim.call(funObj)) === "string";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js
new file mode 100644
index 000000000..5d3afed26
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-47
+description: >
+ String.prototype.trim - 'this' is a object Object that converts to
+ a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call({}) === "[object Object]";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-49.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-49.js
new file mode 100644
index 000000000..7db62114d
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-49.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-49
+description: >
+ String.prototype.trim - 'this' is a RegExp Object that converts to
+ a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var regObj = new RegExp(/test/);
+ return String.prototype.trim.call(regObj) === "/test/";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js
new file mode 100644
index 000000000..75c4e6c76
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-5
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is +0)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(+0) === "0";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-50.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-50.js
new file mode 100644
index 000000000..f34a263dc
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-50.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-50
+description: >
+ String.prototype.trim - 'this' is a Error Object that converts to
+ a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var errObj = new Error("test");
+ return String.prototype.trim.call(errObj) === "Error: test";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-51.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-51.js
new file mode 100644
index 000000000..bf53e07e3
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-51.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-51
+description: >
+ String.prototype.trim - 'this' is a Arguments Object that converts
+ to a string
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var argObj = function () { return arguments; } (1, 2, true);
+ return String.prototype.trim.call(argObj) === "[object Arguments]";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js
new file mode 100644
index 000000000..7dfbacdde
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-6
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is -0)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(-0) === "0";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js
new file mode 100644
index 000000000..fdb6c73a3
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-7
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is positive number)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(30) === "30";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js
new file mode 100644
index 000000000..56d1dab28
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-8
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is negative number)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(-20) === "-20";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js
new file mode 100644
index 000000000..7206517be
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-2-9
+description: >
+ String.prototype.trim - argument 'this' is a number that converts
+ to a string (value is Infinity)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return String.prototype.trim.call(Infinity) === "Infinity";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-1.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-1.js
new file mode 100644
index 000000000..1c10da357
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-1.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-1
+description: String.prototype.trim - 'S' is a string with all LineTerminator
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+
+ var lineTerminatorsStr = "\u000A\u000D\u2028\u2029";
+ return (lineTerminatorsStr.trim() === "");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js
new file mode 100644
index 000000000..b04ee7664
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-10
+description: >
+ String.prototype.trim - 'S' is a string with null character
+ ('\u0000')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\u0000".trim() === "\u0000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js
new file mode 100644
index 000000000..8ee5e72cd
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-11
+description: >
+ String.prototype.trim - 'S' is a string that starts with null
+ character
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\0\u0000abc".trim() === "\0\u0000abc";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js
new file mode 100644
index 000000000..91ca8a575
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-12
+description: >
+ String.prototype.trim - 'S' is a string that ends with null
+ character
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "abc\0\u0000".trim() === "abc\0\u0000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js
new file mode 100644
index 000000000..88cdd75fd
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-13
+description: >
+ String.prototype.trim - 'S' is a string that starts with null
+ character and ends with null character
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\0\u0000abc\0\u0000".trim() === "\0\u0000abc\0\u0000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js
new file mode 100644
index 000000000..5a61ad267
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-14
+description: >
+ String.prototype.trim - 'S' is a string that has null character in
+ the middle
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "a\0\u0000bc".trim() === "a\0\u0000bc";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-2.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-2.js
new file mode 100644
index 000000000..cc30397db
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-2.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-2
+description: String.prototype.trim - 'S' is a string with all WhiteSpace
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+
+ var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
+ return (whiteSpacesStr.trim() === "");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-3.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-3.js
new file mode 100644
index 000000000..874f19d4d
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-3.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-3
+description: >
+ String.prototype.trim - 'S' is a string with all union of
+ WhiteSpace and LineTerminator
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var lineTerminatorsStr = "\u000A\u000D\u2028\u2029";
+ var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
+ var str = whiteSpacesStr + lineTerminatorsStr;
+
+ return (str.trim() === "");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-4.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-4.js
new file mode 100644
index 000000000..eb6d0c7ad
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-4.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-4
+description: >
+ String.prototype.trim - 'S' is a string start with union of all
+ LineTerminator and all WhiteSpace
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var lineTerminatorsStr = "\u000A\u000D\u2028\u2029";
+ var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
+ var str = whiteSpacesStr + lineTerminatorsStr + "abc";
+
+ return (str.trim() === "abc");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-5.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-5.js
new file mode 100644
index 000000000..2864885c4
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-5.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-5
+description: >
+ String.prototype.trim - 'S' is a string end with union of all
+ LineTerminator and all WhiteSpace
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var lineTerminatorsStr = "\u000A\u000D\u2028\u2029";
+ var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
+ var str = "abc" + whiteSpacesStr + lineTerminatorsStr ;
+
+ return (str.trim() === "abc");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-6.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-6.js
new file mode 100644
index 000000000..dc2107a59
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-6.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-6
+description: >
+ String.prototype.trim - 'S' is a string start with union of all
+ LineTerminator and all WhiteSpace and end with union of all
+ LineTerminator and all WhiteSpace
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var lineTerminatorsStr = "\u000A\u000D\u2028\u2029";
+ var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
+ var str = whiteSpacesStr + lineTerminatorsStr + "abc" + whiteSpacesStr + lineTerminatorsStr;
+
+ return (str.trim() === "abc");
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-7.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-7.js
new file mode 100644
index 000000000..1e2c8b748
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-7.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-7
+description: >
+ String.prototype.trim - 'S' is a string that union of
+ LineTerminator and WhiteSpace in the middle
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var lineTerminatorsStr = "\u000A\u000D\u2028\u2029";
+ var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
+ var str = "ab" + whiteSpacesStr + lineTerminatorsStr + "cd";
+
+ return (str.trim() === str);
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js
new file mode 100644
index 000000000..ad9e8e016
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-8
+description: String.prototype.trim - 'S' is a string with all null character
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\0\u0000".trim() === "\0\u0000";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js
new file mode 100644
index 000000000..7715a4881
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-3-9
+description: String.prototype.trim - 'S' is a string with null character ('\0')
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\0".trim() === "\0";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-1.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-1.js
new file mode 100644
index 000000000..25c06ce0c
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-1.js
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-1
+description: >
+ String.prototype.trim handles multiline string with whitepace and
+ lineterminators
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+var s = "\u0009a b\
+c \u0009"
+
+
+ if (s.trim() === "a bc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js
new file mode 100644
index 000000000..0f2e25e53
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-10
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\uFEFFabc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\uFEFFabc".trim() === "abc";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-11.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-11.js
new file mode 100644
index 000000000..d34d3de1e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-11.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-11
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u0009)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u0009".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-12.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-12.js
new file mode 100644
index 000000000..e81b60a0f
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-12.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-12
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u000B)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u000B".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-13.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-13.js
new file mode 100644
index 000000000..1cdf77176
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-13.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-13
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u000C)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u000C".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-14.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-14.js
new file mode 100644
index 000000000..63acdd96a
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-14.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-14
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u0020)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u0020".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-16.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-16.js
new file mode 100644
index 000000000..abd6e04ae
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-16.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-16
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u00A0)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u00A0".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js
new file mode 100644
index 000000000..e4e7c635b
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-18
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\uFEFF)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "abc\uFEFF".trim() === "abc";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-19.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-19.js
new file mode 100644
index 000000000..1e5151ff4
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-19.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-19
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u0009abc\u0009)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u0009abc\u0009".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-2.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-2.js
new file mode 100644
index 000000000..bf2776d5e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-2.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-2
+description: >
+ String.prototype.trim handles whitepace and lineterminators (
+ \u0009abc \u0009)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if (" \u0009abc \u0009".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-20.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-20.js
new file mode 100644
index 000000000..7a5dd477f
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-20.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-20
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Babc\u000B)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Babc\u000B".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-21.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-21.js
new file mode 100644
index 000000000..095bf1553
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-21.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-21
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Cabc\u000C)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Cabc\u000C".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-22.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-22.js
new file mode 100644
index 000000000..74fdf7ecf
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-22.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-22
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u0020abc\u0020)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u0020abc\u0020".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-24.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-24.js
new file mode 100644
index 000000000..70c652aa3
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-24.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-24
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u00A0abc\u00A0)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u00A0abc\u00A0".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-27.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-27.js
new file mode 100644
index 000000000..87874fd65
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-27.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-27
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u0009\u0009)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u0009\u0009".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-28.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-28.js
new file mode 100644
index 000000000..b3249fc0e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-28.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-28
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000B\u000B)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000B\u000B".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-29.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-29.js
new file mode 100644
index 000000000..27acf41c9
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-29.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-29
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000C\u000C)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000C\u000C".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-3.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-3.js
new file mode 100644
index 000000000..d17f87452
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-3.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-3
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u0009abc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u0009abc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-30.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-30.js
new file mode 100644
index 000000000..584ec5cdc
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-30.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-30
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u0020\u0020)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u0020\u0020".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-32.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-32.js
new file mode 100644
index 000000000..65c3d3967
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-32.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-32
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u00A0\u00A0)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u00A0\u00A0".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js
new file mode 100644
index 000000000..690ed2115
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-34
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\uFEFF\uFEFF)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "\uFEFF\uFEFF".trim() === "";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-35.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-35.js
new file mode 100644
index 000000000..76c52964d
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-35.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-35
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u0009c)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\u0009c".trim() === "ab\u0009c") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-36.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-36.js
new file mode 100644
index 000000000..880847c51
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-36.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-36
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u000Bc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\u000Bc".trim() === "ab\u000Bc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-37.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-37.js
new file mode 100644
index 000000000..657f0fa20
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-37.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-37
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u000Cc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\u000Cc".trim() === "ab\u000Cc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-38.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-38.js
new file mode 100644
index 000000000..d9e3ea83e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-38.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-38
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u0020c)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\u0020c".trim() === "ab\u0020c") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js
new file mode 100644
index 000000000..48244bb96
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-39
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u0085c)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ return "ab\u0085c".trim() === "ab\u0085c";
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-4.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-4.js
new file mode 100644
index 000000000..706a667b7
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-4.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-4
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Babc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Babc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-40.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-40.js
new file mode 100644
index 000000000..ce25d3de8
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-40.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-40
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u00A0c)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\u00A0c".trim() === "ab\u00A0c") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-41.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-41.js
new file mode 100644
index 000000000..c40bb7045
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-41.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-41
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\u200Bc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\u200Bc".trim() === "ab\u200Bc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-42.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-42.js
new file mode 100644
index 000000000..7e93ea070
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-42.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-42
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (ab\uFEFFc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("ab\uFEFFc".trim() === "ab\uFEFFc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-43.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-43.js
new file mode 100644
index 000000000..78fc758c0
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-43.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-43
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Aabc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Aabc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-44.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-44.js
new file mode 100644
index 000000000..959efdd39
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-44.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-44
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Dabc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Dabc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-45.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-45.js
new file mode 100644
index 000000000..b3fdbd172
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-45.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-45
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2028abc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u2028abc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-46.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-46.js
new file mode 100644
index 000000000..2491c3548
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-46.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-46
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2029abc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u2029abc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-47.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-47.js
new file mode 100644
index 000000000..14c9f2182
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-47.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-47
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u000A)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u000A".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-48.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-48.js
new file mode 100644
index 000000000..c393317e8
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-48.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-48
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u000D)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u000D".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-49.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-49.js
new file mode 100644
index 000000000..2d7a205e6
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-49.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-49
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u2028)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u2028".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-5.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-5.js
new file mode 100644
index 000000000..8e79500c3
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-5.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-5
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Cabc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Cabc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-50.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-50.js
new file mode 100644
index 000000000..ebda6031b
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-50.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-50
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (abc\u2029)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("abc\u2029".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-51.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-51.js
new file mode 100644
index 000000000..ac73f5d6f
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-51.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-51
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Aabc\u000A)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Aabc\u000A".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-52.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-52.js
new file mode 100644
index 000000000..70739d4b8
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-52.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-52
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000Dabc\u000D)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000Dabc\u000D".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-53.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-53.js
new file mode 100644
index 000000000..409821967
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-53.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-53
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2028abc\u2028)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u2028abc\u2028".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-54.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-54.js
new file mode 100644
index 000000000..c75a6574b
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-54.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-54
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2029abc\u2029)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u2029abc\u2029".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-55.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-55.js
new file mode 100644
index 000000000..637945b0e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-55.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-55
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000A\u000A)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000A\u000A".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-56.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-56.js
new file mode 100644
index 000000000..0bde15c07
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-56.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-56
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u000D\u000D)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u000D\u000D".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-57.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-57.js
new file mode 100644
index 000000000..1b4a9739a
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-57.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-57
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2028\u2028)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u2028\u2028".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-58.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-58.js
new file mode 100644
index 000000000..3f849ca85
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-58.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-58
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2029\u2029)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u2029\u2029".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-59.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-59.js
new file mode 100644
index 000000000..28eee466a
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-59.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-59
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u2029abc as a multiline string)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ var s = "\u2029\
+ abc";
+ if (s.trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-6.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-6.js
new file mode 100644
index 000000000..23b7de017
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-6.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-6
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u0020abc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u0020abc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-60.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-60.js
new file mode 100644
index 000000000..bfafdbe71
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-60.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-60
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (string with just blanks)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if (" ".trim() === "") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-8.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-8.js
new file mode 100644
index 000000000..a1173730e
--- /dev/null
+++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-8.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+es5id: 15.5.4.20-4-8
+description: >
+ String.prototype.trim handles whitepace and lineterminators
+ (\u00A0abc)
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+ if ("\u00A0abc".trim() === "abc") {
+ return true;
+ }
+ }
+runTestCase(testcase);
diff --git a/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T1.js b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T1.js
new file mode 100644
index 000000000..a3080da71
--- /dev/null
+++ b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T1.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.valueOf() returns this string value
+es5id: 15.5.4.3_A1_T1
+description: Create String object as new String(1) and check it`s valueOf()
+---*/
+
+var __string__obj = new String(1);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.valueOf() !== ""+1) {
+ $ERROR('#1: __string__obj = new String(1); __string__obj.valueOf() === ""+1. Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T2.js b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T2.js
new file mode 100644
index 000000000..553ccf768
--- /dev/null
+++ b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.valueOf() returns this string value
+es5id: 15.5.4.3_A1_T2
+description: Create String object as new String(true) and check it`s valueOf()
+---*/
+
+var __string__obj = new String(true);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.valueOf() !== ""+true) {
+ $ERROR('#1: __string__obj = new String(true); __string__obj.valueOf() === ""+true. Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T3.js b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T3.js
new file mode 100644
index 000000000..cbeb4dd01
--- /dev/null
+++ b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T3.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.valueOf() returns this string value
+es5id: 15.5.4.3_A1_T3
+description: Create String object as new String(string) and check it`s valueOf()
+---*/
+
+var __string__obj = new String("metal");
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.valueOf() !== "metal") {
+ $ERROR('#1: __string__obj = new String("metal"); __string__obj.valueOf() === "metal". Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T4.js b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T4.js
new file mode 100644
index 000000000..e7beb039a
--- /dev/null
+++ b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A1_T4.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: String.prototype.valueOf() returns this string value
+es5id: 15.5.4.3_A1_T4
+description: >
+ Create String object as new String(function(){}()) and check it`s
+ valueOf()
+---*/
+
+var __string__obj = new String(function(){}());
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if (__string__obj.valueOf() !== "undefined") {
+ $ERROR('#1: __string__obj = new String(function(){}()); __string__obj.valueOf() === "undefined". Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T1.js b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T1.js
new file mode 100644
index 000000000..1b13ea604
--- /dev/null
+++ b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T1.js
@@ -0,0 +1,35 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The valueOf function is not generic; it throws a TypeError exception if its this value is not a String object.
+ Therefore, it cannot be transferred to other kinds of objects for use as a method
+es5id: 15.5.4.3_A2_T1
+description: Checking if creating variable String.prototype.valueOf fails
+includes: [$FAIL.js]
+---*/
+
+var __valueOf = String.prototype.valueOf;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __valueOf !== "function") {
+ $ERROR('#1: __valueOf = String.prototype.valueOf; typeof __valueOf === "function". Actual: typeof __valueOf ==='+typeof __valueOf );
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ var x = __valueOf();
+ $FAIL('#2: "__valueOf = String.prototype.valueOf; var x = __valueOf()" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#2.1: Exception is instance of TypeError. Actual: exception is '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T2.js b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T2.js
new file mode 100644
index 000000000..24f3e47db
--- /dev/null
+++ b/test/built-ins/String/prototype/valueOf/S15.5.4.3_A2_T2.js
@@ -0,0 +1,35 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The valueOf function is not generic; it throws a TypeError exception if its this value is not a String object.
+ Therefore, it cannot be transferred to other kinds of objects for use as a method
+es5id: 15.5.4.3_A2_T2
+description: Checking if creating the object String.prototype.valueOf fails
+includes: [$FAIL.js]
+---*/
+
+var __obj={valueOf : String.prototype.valueOf};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __obj["valueOf"] !== "function") {
+ $ERROR('#1: var __obj={valueOf : String.prototype.valueOf}; typeof __obj["valueOf"] === "function". Actual: typeof __obj["valueOf"] ==='+typeof __obj["valueOf"] );
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ var x = (__obj == 1);
+ $FAIL('#2: "var __obj={valueOf : String.prototype.valueOf}; var x = (__obj == 1)" lead to throwing exception');
+} catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#2.1: Exception is instance of TypeError. Actual: exception is '+e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////