[Webkit-unassigned] [Bug 16652] Firefox and JavaScriptCore differ in Number.toString(integer)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 29 22:25:21 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16652





------- Comment #2 from ddkilzer at webkit.org  2007-12-29 22:25 PDT -------
(In reply to comment #1)
> So we simply chose to match Firefox (or IE if we determine their behavior to be
> different).

Results from running MSIE 7 on Windows XP SP2 in Virtual PC 7.0.3 on Mac OS X
10.4.11 (8S165):

PASS (0.0).toString(4) is "0"
PASS (-0.0).toString(4) is "0"
PASS (0.0).toString() is "0"
PASS (-0.0).toString() is "0"
PASS (1234.567).toString() is "1234.567"
PASS (1234.567).toString(0) threw exception [object Error].
PASS (1234.567).toString(null) threw exception [object Error].
PASS (1234.567).toString(false) threw exception [object Error].
PASS (1234.567).toString('foo') threw exception [object Error].
PASS (1234.567).toString(nan) threw exception [object Error].
PASS (1234.567).toString(1) threw exception [object Error].
PASS (1234.567).toString(true) threw exception [object Error].
PASS (1234.567).toString('1') threw exception [object Error].
FAIL (1234.567).toString(3) should be 1200201.120022100021001021021002202. Was
1200201.120022100021001021021002201.
PASS (1234.567).toString(4) is "103102.21010212322113203111"
FAIL (1234.567).toString(5) should be 14414.240414141414141414. Was
14414.2404141414141414142.
FAIL (1234.567).toString(6) should be 5414.32224554134430233. Was
5414.322245541344302332.
FAIL (1234.567).toString(7) should be 3412.365323661111653. Was
3412.3653236611116525.
PASS (1234.567).toString(8) is "2322.44223351361524"
PASS (1234.567).toString(9) is "1621.50830703723265"
PASS (1234.567).toString(10) is "1234.567"
FAIL (1234.567).toString(11) should be a22.62674a0a5885. Was
a22.62674a0a588491.
FAIL (1234.567).toString(12) should be 86a.697938b17701. Was 86a.697938b177012.
FAIL (1234.567).toString(13) should be 73c.74a91191a65. Was 73c.74a91191a64cb.
PASS (1234.567).toString(14) is "642.7d1bc2caa757"
FAIL (1234.567).toString(15) should be 574.87895959596. Was 574.87895959595a.
PASS (1234.567).toString(16) is "4d2.9126e978d5"
PASS (1234.567).toString(17) is "44a.9aeb6faa0da"
FAIL (1234.567).toString(18) should be 3ea.a3cd7102ac. Was 3ea.a3cd7102abf.
FAIL (1234.567).toString(19) should be 37i.aed102a04d. Was 37i.aed102a04d4.
FAIL (1234.567).toString(20) should be 31e.b6g. Was 31e.b6g00000001.
PASS (1234.567).toString(21) is "2gg.bj0kf5cfe9"
FAIL (1234.567).toString(22) should be 2c2.ca9937cak. Was 2c2.ca9937cak1.
PASS (1234.567).toString(23) is "27f.d0lfjb1a7c"
FAIL (1234.567).toString(24) should be 23a.dee4nj99j. Was 23a.dee4nj99j0.
FAIL (1234.567).toString(25) should be 1o9.e49999999. Was 1o9.e49999999a.
FAIL (1234.567).toString(26) should be 1lc.ej7fa4pkf. Was 1lc.ej7fa4pkfb.
FAIL (1234.567).toString(27) should be 1ij.f8971772k. Was 1ij.f8971772j.
PASS (1234.567).toString(28) is "1g2.foelqia8e"
FAIL (1234.567).toString(29) should be 1dg.gcog9e05q. Was 1dg.gcog9e05p.
FAIL (1234.567).toString(30) should be 1b4.h09. Was 1b4.h09000000.
FAIL (1234.567).toString(31) should be 18p.hhrfcj3t. Was 18p.hhrfcj3t1.
PASS (1234.567).toString(32) is "16i.i4jeiu6l"
FAIL (1234.567).toString(33) should be 14d.inf96rdvm. Was 14d.inf96rdvl.
FAIL (1234.567).toString(34) should be 12a.j9fchdtm. Was 12a.j9fchdtm1.
FAIL (1234.567).toString(35) should be 109.jtk4d4d4e. Was 109.jtk4d4d4d.
FAIL (1234.567).toString(36) should be ya.kety9sifl. Was ya.kety9sifkl.
PASS (1234.567).toString(37) threw exception [object Error].
PASS (1234.567).toString(-1) threw exception [object Error].
PASS (1234.567).toString(posInf) threw exception [object Error].
PASS (1234.567).toString(negInf) threw exception [object Error].
PASS posInf.toString() is "Infinity"
PASS negInf.toString() is "-Infinity"
PASS nan.toString() is "NaN"
PASS successfullyParsed is true

TEST COMPLETE


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list