diff options
author | André Bargull <andre.bargull@gmail.com> | 2018-02-09 09:09:47 -0800 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2018-02-09 12:09:47 -0500 |
commit | f95b56ab28c5f18150f30fbfa889a4f6ba0e50a1 (patch) | |
tree | d403f704c1b6a1842f12df380651919beaaf5fef /test/built-ins/Boolean/prototype | |
parent | a01de4a722d088055a7d84d8c691ddd7109edb34 (diff) | |
download | qtdeclarative-testsuites-f95b56ab28c5f18150f30fbfa889a4f6ba0e50a1.tar.gz |
Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722d088055a7d84d8c691ddd7109edb34.
Diffstat (limited to 'test/built-ins/Boolean/prototype')
16 files changed, 113 insertions, 121 deletions
diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js index 7dc740ee1..980936ebe 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A4.js @@ -9,8 +9,8 @@ description: Checking if enumerating the Boolean.prototype property fails ---*/ //CHECK#1 -for (x in Boolean) { - if (x === "prototype") { +for(x in Boolean) { + if(x === "prototype") { $ERROR('#1: Boolean.prototype has the attribute DontEnum'); } } diff --git a/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js b/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js index 218632c66..080daa3eb 100644 --- a/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js +++ b/test/built-ins/Boolean/prototype/constructor/S15.6.4.1_A1.js @@ -11,6 +11,6 @@ description: Compare Boolean.prototype.constructor with Boolean ---*/ //CHECK#1 -if (Boolean.prototype.constructor !== Boolean) { +if(Boolean.prototype.constructor !== Boolean){ $ERROR('#1: Boolean.prototype.constructor === Boolean'); } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js index cf32db61a..fa1b30538 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1.js @@ -12,36 +12,36 @@ description: no arguments ---*/ //CHECK#1 -if (Boolean.prototype.toString() !== "false") { +if(Boolean.prototype.toString() !== "false"){ $ERROR('#1: Boolean.prototype.toString() === "false"'); } //CHECK#2 -if ((new Boolean()).toString() !== "false") { +if((new Boolean()).toString() !== "false"){ $ERROR('#2: (new Boolean()).toString() === "false"'); } //CHECK#3 -if ((new Boolean(false)).toString() !== "false") { +if((new Boolean(false)).toString() !== "false"){ $ERROR('#3: (new Boolean(false)).toString() === "false"'); } //CHECK#4 -if ((new Boolean(true)).toString() !== "true") { +if((new Boolean(true)).toString() !== "true"){ $ERROR('#4: (new Boolean(true)).toString() === "true"'); } //CHECK#5 -if ((new Boolean(1)).toString() !== "true") { +if((new Boolean(1)).toString() !== "true"){ $ERROR('#5: (new Boolean(1)).toString() === "true"'); } //CHECK#6 -if ((new Boolean(0)).toString() !== "false") { +if((new Boolean(0)).toString() !== "false"){ $ERROR('#6: (new Boolean(0)).toString() === "false"'); } //CHECK#7 -if ((new Boolean(new Object())).toString() !== "true") { +if((new Boolean(new Object())).toString() !== "true"){ $ERROR('#7: (new Boolean(new Object())).toString() === "true"'); } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js index 399a3676c..d949b83b6 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2.js @@ -12,36 +12,36 @@ description: with some argument ---*/ //CHECK#1 -if (Boolean.prototype.toString(true) !== "false") { +if(Boolean.prototype.toString(true) !== "false"){ $ERROR('#1: Boolean.prototype.toString(true) === "false"'); } //CHECK#2 -if ((new Boolean()).toString(true) !== "false") { +if((new Boolean()).toString(true) !== "false"){ $ERROR('#2: (new Boolean()).toString(true) === "false"'); } //CHECK#3 -if ((new Boolean(false)).toString(true) !== "false") { +if((new Boolean(false)).toString(true) !== "false"){ $ERROR('#3: (new Boolean(false)).toString(true) === "false"'); } //CHECK#4 -if ((new Boolean(true)).toString(false) !== "true") { +if((new Boolean(true)).toString(false) !== "true"){ $ERROR('#4: (new Boolean(true)).toString(false) === "true"'); } //CHECK#5 -if ((new Boolean(1)).toString(false) !== "true") { +if((new Boolean(1)).toString(false) !== "true"){ $ERROR('#5: (new Boolean(1)).toString(false) === "true"'); } //CHECK#6 -if ((new Boolean(0)).toString(true) !== "false") { +if((new Boolean(0)).toString(true) !== "false"){ $ERROR('#6: (new Boolean(0)).toString(true) === "false"'); } //CHECK#7 -if ((new Boolean(new Object())).toString(false) !== "true") { +if((new Boolean(new Object())).toString(false) !== "true"){ $ERROR('#7: (new Boolean(new Object())).toString(false) === "true"'); } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js index df5ad2fe8..7331619e9 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T1.js @@ -12,27 +12,27 @@ description: transferring to the String objects ---*/ //CHECK#1 -try { +try{ var s1 = new String(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } //CHECK#2 -try { +try{ var s2 = new String(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js index 8ada5d746..ae3cded49 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T2.js @@ -12,27 +12,27 @@ description: transferring to the Number objects ---*/ //CHECK#1 -try { +try{ var s1 = new Number(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new Number(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js index f3df79be2..c13b361d1 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T3.js @@ -12,27 +12,27 @@ description: transferring to the Date objects ---*/ //CHECK#1 -try { +try{ var s1 = new Date(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new Date(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js index 277cf2646..382dc7cd2 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T4.js @@ -12,27 +12,27 @@ description: transferring to the Object objects ---*/ //CHECK#1 -try { +try{ var s1 = new Object(); s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new Object(); s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js index 99776dd85..a6dca911d 100644 --- a/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js +++ b/test/built-ins/Boolean/prototype/toString/S15.6.4.2_A2_T5.js @@ -12,31 +12,27 @@ description: transferring to the other objects ---*/ //CHECK#1 -try { - var s1 = { - x: 1 - }; +try{ + var s1 = {x: 1}; s1.toString = Boolean.prototype.toString; var v1 = s1.toString(); $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { - var s2 = { - x: 1 - }; +try{ + var s2 = {x: 1}; s2.myToString = Boolean.prototype.toString; var v2 = s2.myToString(); $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js index 743e1966c..257721b86 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1.js @@ -9,31 +9,31 @@ description: no arguments ---*/ //CHECK#1 -if (Boolean.prototype.valueOf() !== false) { +if(Boolean.prototype.valueOf() !== false){ $ERROR('#1: Boolean.prototype.valueOf() === false'); } //CHECK#2 -if ((new Boolean()).valueOf() !== false) { +if((new Boolean()).valueOf() !== false){ $ERROR('#2: (new Boolean()).valueOf() === false'); } //CHECK#3 -if ((new Boolean(0)).valueOf() !== false) { +if((new Boolean(0)).valueOf() !== false){ $ERROR('#3: (new Boolean(0)).valueOf() === false'); } //CHECK#4 -if ((new Boolean(-1)).valueOf() !== true) { +if((new Boolean(-1)).valueOf() !== true){ $ERROR('#4: (new Boolean(-1)).valueOf() === true'); } //CHECK#5 -if ((new Boolean(1)).valueOf() !== true) { +if((new Boolean(1)).valueOf() !== true){ $ERROR('#5: (new Boolean(1)).valueOf() === true'); } //CHECK#6 -if ((new Boolean(new Object())).valueOf() !== true) { +if((new Boolean(new Object())).valueOf() !== true){ $ERROR('#6: (new Boolean(new Object())).valueOf() === true'); } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js index 095d0daaa..2cdc5fe69 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2.js @@ -9,31 +9,31 @@ description: calling with argument ---*/ //CHECK#1 -if (Boolean.prototype.valueOf(true) !== false) { +if(Boolean.prototype.valueOf(true) !== false){ $ERROR('#1: Boolean.prototype.valueOf(true) === false'); } //CHECK#2 -if ((new Boolean()).valueOf(true) !== false) { +if((new Boolean()).valueOf(true) !== false){ $ERROR('#2: (new Boolean()).valueOf(true) === false'); } //CHECK#3 -if ((new Boolean(0)).valueOf(true) !== false) { +if((new Boolean(0)).valueOf(true) !== false){ $ERROR('#3: (new Boolean(0)).valueOf(true) === false'); } //CHECK#4 -if ((new Boolean(-1)).valueOf(false) !== true) { +if((new Boolean(-1)).valueOf(false) !== true){ $ERROR('#4: (new Boolean(-1)).valueOf(false) === true'); } //CHECK#5 -if ((new Boolean(1)).valueOf(false) !== true) { +if((new Boolean(1)).valueOf(false) !== true){ $ERROR('#5: (new Boolean(1)).valueOf(false) === true'); } //CHECK#6 -if ((new Boolean(new Object())).valueOf(false) !== true) { +if((new Boolean(new Object())).valueOf(false) !== true){ $ERROR('#6: (new Boolean(new Object())).valueOf(false) === true'); } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js index 0651f8cb3..f878faef2 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T1.js @@ -12,27 +12,27 @@ description: transferring to the String objects ---*/ //CHECK#1 -try { +try{ var s1 = new String(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new String(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js index 6e2af85b2..3596de93b 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T2.js @@ -12,27 +12,27 @@ description: transferring to the Number objects ---*/ //CHECK#1 -try { +try{ var s1 = new Number(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new Number(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js index f66950631..560843e41 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T3.js @@ -12,27 +12,27 @@ description: transferring to the Date objects ---*/ //CHECK#1 -try { +try{ var s1 = new Date(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new Date(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js index 816ef97d7..93f19a68a 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T4.js @@ -12,27 +12,27 @@ description: transferring to the Object objects ---*/ //CHECK#1 -try { +try{ var s1 = new Object(); s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { +try{ var s2 = new Object(); s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } diff --git a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js index 3f645a0bf..138ed48c2 100644 --- a/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js +++ b/test/built-ins/Boolean/prototype/valueOf/S15.6.4.3_A2_T5.js @@ -12,31 +12,27 @@ description: transferring to the other objects ---*/ //CHECK#1 -try { - var s1 = { - x: 1 - }; +try{ + var s1 = {x: 1}; s1.valueOf = Boolean.prototype.valueOf; var v1 = s1.valueOf(); $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } //CHECK#1 -try { - var s2 = { - x: 1 - }; +try{ + var s2 = {x: 1}; s2.myValueOf = Boolean.prototype.valueOf; var v2 = s2.myValueOf(); $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError'); } -catch (e) { - if (!(e instanceof TypeError)) { - $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not ' + e); +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } |