summaryrefslogtreecommitdiff
path: root/test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js')
-rw-r--r--test/built-ins/String/prototype/split/S15.5.4.14_A1_T15.js31
1 files changed, 23 insertions, 8 deletions
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
index 46cf12809..52c2fc9ca 100644
--- 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
@@ -16,9 +16,20 @@ description: >
throw exception
---*/
-var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}};
+var __obj = {
+ toString: function() {
+ return {};
+ },
+ valueOf: function() {
+ throw "intostr";
+ }
+};
-var __obj2 = {valueOf:function(){throw "intointeger";}};
+var __obj2 = {
+ valueOf: function() {
+ throw "intointeger";
+ }
+};
__FACTORY.prototype.split = String.prototype.split;
@@ -30,15 +41,19 @@ try {
var x = __instance.split(__obj, __obj2);
$ERROR('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception');
} catch (e) {
- if (e!=="intointeger") {
- $ERROR('#1.1: Exception === "intointeger". Actual: '+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+""};
+function __FACTORY(value) {
+ this.value = value;
+ this.toString = function() {
+ return new Number;
+ };
+ this.valueOf = function() {
+ return this.value + ""
+ };
}