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)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
Waldo
:
review+
brendan
:
approval1.9+
|
Details | Diff | Splinter Review |
(deleted),
text/plain
|
bc
:
review+
|
Details |
Assignee | ||
Comment 1•17 years ago
|
||
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)
Assignee | ||
Comment 2•17 years ago
|
||
Attachment #296515 -
Flags: review?(crowder)
Comment 3•17 years ago
|
||
Can you provide a simplified testcase for this?
Updated•17 years ago
|
Attachment #296515 -
Flags: review?(crowder) → review+
Assignee | ||
Comment 4•17 years ago
|
||
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.
Assignee | ||
Comment 5•17 years ago
|
||
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?
Updated•17 years ago
|
Attachment #296599 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 6•17 years ago
|
||
Attachment #296622 -
Flags: review?(bclary)
Assignee | ||
Comment 7•17 years ago
|
||
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Attachment #296622 -
Attachment mime type: application/x-javascript → text/plain
Comment 8•17 years ago
|
||
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+
Comment 9•17 years ago
|
||
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-
You need to log in
before you can comment on or make changes to this bug.
Description
•