WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
3975
JS test suite puts incorrect limitations on Function.toString()
https://bugs.webkit.org/show_bug.cgi?id=3975
Summary
JS test suite puts incorrect limitations on Function.toString()
Geoffrey Garen
Reported
2005-07-12 17:26:04 PDT
Test failures: js1_2/function/tostring-1.js js1_2/function/tostring-2.js These are false positives based on hard-coded results for Function.toString(). Our Function.toString() doesn't match Firefox's, but it doesn't seem worth the work to make it, since ECMA says Function.toString() is implementation dependent, and even the moz test says it is only trying to "verify that the result is something reasonable." ECMA spec says: 15.3.4.2 Func t i o n. pr o t o t y pe . t o St r i ng ( ) An implementation-dependent representation of the function is returned... Note in particular that the use and placement of white space, line terminators, and semicolons within the representation string is implementation-dependent. The one ECMA requirement is: "This representation has the syntax of a FunctionDeclaration."
Attachments
Patch
(3.43 KB, patch)
2005-07-12 17:27 PDT
,
Geoffrey Garen
darin
: review-
Details
Formatted Diff
Diff
new fix, added comments, added whitespace insensitive compare
(44.42 KB, patch)
2012-09-06 15:18 PDT
,
Gavin Barraclough
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2005-07-12 17:27:37 PDT
Created
attachment 2937
[details]
Patch This patch replaces the mozilla format for Function.toString() in the test suite's expected results with the JavaScriptCore format.
Darin Adler
Comment 2
2005-07-18 08:06:08 PDT
Comment on
attachment 2937
[details]
Patch This needs a comment at least, explaining why it's changed. Later when we merge our test in with a newer version of the Mozilla tests, we'd like comments to ease the merging. An even better alternative would be to figure out a way to make the test tolerant of the differences in whitespace. We might even consider making our format more similar to the one from Mozilla in cases where we like theirs better.
Gavin Barraclough
Comment 3
2012-09-06 15:18:08 PDT
Created
attachment 162603
[details]
new fix, added comments, added whitespace insensitive compare
Geoffrey Garen
Comment 4
2012-09-06 16:02:19 PDT
Comment on
attachment 162603
[details]
new fix, added comments, added whitespace insensitive compare Throwback day.
Gavin Barraclough
Comment 5
2012-09-06 16:23:28 PDT
Fixed in
r127797
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug