Opened 12 years ago
Closed 12 years ago
#5200 closed defect (fixed)
[patch]doh.assertEquals() fails to differentiate objects
Reported by: | Adam Peller | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | General | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
doh.assertEqual({}, {a:1})
true
doh.assertEqual(new Date(2000,0,1), new Date(2007, 11, 31))
true
Attachments (2)
Change History (12)
comment:1 Changed 12 years ago by
Changed 12 years ago by
Attachment: | patch5200.diff added |
---|
this fixes at least doh.assertEqual({}, {a:1})
Changed 12 years ago by
Attachment: | patch5200.2.diff added |
---|
now the patch also handles the mentioned date comparison
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed, ready for commitingI guess.
comment:4 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 Changed 12 years ago by
Summary: | doh.assertEquals() fails to differentiate objects → [patch]doh.assertEquals() fails to differentiate objects |
---|
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:7 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
how about simply casting dates to numbers or calling getTime() on both operands?
comment:9 Changed 12 years ago by
I assume the problem with the checked in patch is that it returns false even when two dates objects are equal. It only returns true when you pass in the same object twice, right?
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
(In [11901]) Updated test to explicitly check for failures with Boolean coercion - Refs #5200. Invalid month/day names on parse now return null. Thanks, Doug. Fixes #4864