Closed Bug 342377 Opened 18 years ago Closed 18 years ago

Add do_ensure to the test harness

Categories

(Core :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

I find myself writing 

  do_check_eq(... , true);

a whole lot.  do_ensure would just save some typing.  ;)
Blocks: test-harness
Attached patch Like so (obsolete) — Splinter Review
Attachment #226612 - Flags: review?(davel)
Version: 1.8 Branch → Trunk
I'm leaning towards standardizing on *unit-named tests, like assertTrue, assertEquals, ...

Also, I'm not sure how long-lived this set of methods will be, since it may be easier to port tests to a slightly different harness (still based on xpcshell, but more like jsunit) than to try to add the reporting and invocation infrastructure to this set of code.

As a short-term comprimise, would you be willing to rename do_ensure() to do_check_true()?

-Dave, who with this comment just wiped out the amount of typing saved in test cases
Attachment #226612 - Attachment is obsolete: true
Attachment #226654 - Flags: review?(davel)
Attachment #226612 - Flags: review?(davel)
Attachment #226654 - Flags: review?(davel) → review+
Checked in.  Thanks!
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Er, actually checked in now for real.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: