summaryrefslogtreecommitdiff
path: root/test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js')
-rw-r--r--test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js b/test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js
index 625dc68de..eb862fd33 100644
--- a/test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js
+++ b/test/built-ins/Number/prototype/valueOf/S15.7.4.4_A2_T05.js
@@ -11,27 +11,31 @@ description: transferring to the other objects
---*/
//CHECK#1
-try{
- var s1 = {x: 1};
+try {
+ var s1 = {
+ x: 1
+ };
s1.valueOf = Number.prototype.valueOf;
- var v1 = s1.valueOf();
+ var v1 = s1.valueOf();
$ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError');
}
-catch(e){
- if(!(e instanceof TypeError)){
- $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);
+catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not ' + e);
}
}
//CHECK#2
-try{
- var s2 = {x: 1};
+try {
+ var s2 = {
+ x: 1
+ };
s2.myValueOf = Number.prototype.valueOf;
- var v2 = s2.myValueOf();
+ var v2 = s2.myValueOf();
$ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError');
}
-catch(e){
- if(!(e instanceof TypeError)){
- $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);
+catch (e) {
+ if (!(e instanceof TypeError)) {
+ $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not ' + e);
}
}