Closed
Bug 714467
Opened 13 years ago
Closed 11 years ago
do_check_n/eq should perform strict equality check
Categories
(Testing :: XPCShell Harness, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: asaf, Unassigned)
Details
do_check_eq seems to perform regular equality check. I have a use case for strict equality check (for now I'm just using do_check_true), and I think that switching all tests to work this way is better in general.
Comment 1•13 years ago
|
||
Actually, if we're going to change this (and I'd love to see this changed), we should change to "sameness", not strict equality. Sameness would treat NaN as identical to NaN, -0 as identical to -0 but not to +0, and +0 as identical to +0 but not -0. The SameValue definition in js/src/tests/shell.js implements this:
http://hg.mozilla.org/mozilla-central/annotate/a447e66c3174/js/src/tests/shell.js#l266
Reporter | ||
Comment 2•13 years ago
|
||
Works for me.
I'll try to patch it on try sometime this week and see how much it burns.
Reporter | ||
Comment 3•11 years ago
|
||
do_check_n/eq are now deprecated in favor of (not)equal, and (not)deepEqual, which are what I asked for here (albeit they do much more than a simple === check). It's somewhat unfortunate that the deep checks are opt-in, but that's not going to change.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Reporter | ||
Comment 4•11 years ago
|
||
Oh, and there are also (not)strictEqual, which do simple ===/!== checks.
You need to log in
before you can comment on or make changes to this bug.
Description
•