Closed Bug 411889 Opened 17 years ago Closed 17 years ago

Given a = num.toString(), b = num.toString(undefined), c = num.toString(10), expect (a === b && b === c)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

Attachments

(2 files, 1 obsolete file)

Blah, submitted too early -- patch in a second... This doesn't fix the relevant acid3 test (84 for the moment) -- there's a bug in toPrecision as well, but its code is intertwined with that for toFixed/toExponential, and I'm wary of spinning out something too quickly there.
Summary: Given a = num.toString(), b = num.toString(undefined), c = num.toString(10), expect (a == b && b === c) → Given a = num.toString(), b = num.toString(undefined), c = num.toString(10), expect (a === b && b === c)
Attached patch Simple fix (obsolete) (deleted) — Splinter Review
Attachment #296515 - Flags: review?(crowder)
Can you provide a simplified testcase for this?
Attachment #296515 - Flags: review?(crowder) → review+
Before: js> 3.3.toString(undefined) typein:1: Error: illegal radix 0 After: js> 3.3.toString(undefined) 3.3 The latter is of course correct per ES3.
Attached patch With brendan's change from IRC (deleted) — Splinter Review
3.3.toString.length should be 1, making the argc check unnecessary.
Attachment #296515 - Attachment is obsolete: true
Attachment #296599 - Flags: review+
Attachment #296599 - Flags: approval1.9?
Attachment #296599 - Flags: approval1.9? → approval1.9+
Attached file Untested testcase (deleted) —
Attachment #296622 - Flags: review?(bclary)
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #296622 - Attachment mime type: application/x-javascript → text/plain
Comment on attachment 296622 [details] Untested testcase [snip] > >var gTestfile = 'toString-undefined.js'; ecma_3/Number/15.7.4.2-01.js >//----------------------------------------------------------------------------- >var BUGNUMBER = "411889"; [snip] >catch (e) >{ > failed = e; >} > > > one blank line please. >expect = false; >actual = failed; > >reportCompare(expect, actual, summary); passes in trunk but fails on branch with expected: Type mismatch, expected type boolean, actual type object Expected value 'false', Actual value 'Error: illegal radix 0' I'll update public-failures.txt after the test is checked in. r+ with those nits.
Attachment #296622 - Flags: review?(bclary) → review+
added the test for 3.3.toString.length should be 1 /cvsroot/mozilla/js/tests/public-failures.txt, new revision: 1.26; previous revision: 1.25 /cvsroot/mozilla/js/tests/ecma_3/Number/15.7.4.2-01.js initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
Depends on: 412068
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: