keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | info: > |
| 6 | Result of number conversion from number value equals to the input |
| 7 | argument (no conversion) |
| 8 | es5id: 9.3_A4.1_T2 |
| 9 | description: > |
| 10 | Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are |
| 11 | converted to Number with implicit transformation |
| 12 | ---*/ |
| 13 | |
| 14 | // CHECK#1 |
| 15 | if (+(13) !== 13) { |
| 16 | $ERROR('#1: +(13) === 13. Actual: ' + (+(13))); |
| 17 | } |
| 18 | |
| 19 | // CHECK#2 |
| 20 | if (+(-13) !== -13) { |
| 21 | $ERROR('#2: +(-13) === -13. Actual: ' + (+(-13))); |
| 22 | } |
| 23 | |
| 24 | // CHECK#3 |
| 25 | if (+(1.3) !== 1.3) { |
| 26 | $ERROR('#3: +(1.3) === 1.3. Actual: ' + (+(1.3))); |
| 27 | } |
| 28 | |
| 29 | // CHECK#4 |
| 30 | if (+(-1.3) !== -1.3) { |
| 31 | $ERROR('#4: +(-1.3) === -1.3. Actual: ' + (+(-1.3))); |
| 32 | } |