| OLD | NEW |
| (Empty) |
| 1 This test checks for accuracy in numeric conversions, particularly with large or
infinite values. | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 | |
| 6 PASS Number(1152921504606847105).toString() is '1152921504606847200' | |
| 7 PASS parseInt('1152921504606847105').toString() is '1152921504606847200' | |
| 8 PASS (- (- '1152921504606847105')).toString() is '1152921504606847200' | |
| 9 PASS Number(0x1000000000000081).toString(16) is '1000000000000100' | |
| 10 PASS parseInt('0x1000000000000081', 16).toString(16) is '1000000000000100' | |
| 11 PASS (- (- '0x1000000000000081')).toString(16) is '1000000000000100' | |
| 12 PASS Number(0100000000000000000201).toString(8) is '100000000000000000400' | |
| 13 PASS parseInt('100000000000000000201', 8).toString(8) is '100000000000000000400' | |
| 14 PASS (- 'infinity').toString() is 'NaN' | |
| 15 PASS parseInt('10000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000').toString() is 'Infinity' | |
| 16 PASS parseInt('0x100000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000', 16).toString() is 'Infinity' | |
| 17 PASS parseInt('10000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000', 8).toString() is 'Infinity' | |
| 18 PASS parseInt('9007199254740992e2000').toString() is '9007199254740992' | |
| 19 PASS parseInt('9007199254740992.0e2000').toString() is '9007199254740992' | |
| 20 FAIL parseInt(NaN) should be 0. Was NaN. | |
| 21 FAIL parseInt(-Infinity) should be 0. Was NaN. | |
| 22 FAIL parseInt(Infinity) should be 0. Was NaN. | |
| 23 PASS successfullyParsed is true | |
| 24 | |
| 25 TEST COMPLETE | |
| OLD | NEW |