Add do_ensure to the test harness

RESOLVED FIXED

Status

()

RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

13 years ago
I find myself writing 

  do_check_eq(... , true);

a whole lot.  do_ensure would just save some typing.  ;)
(Assignee)

Updated

13 years ago
Blocks: 322893
(Assignee)

Comment 1

13 years ago
Created attachment 226612 [details] [diff] [review]
Like so
Attachment #226612 - Flags: review?(davel)
(Assignee)

Updated

13 years ago
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
(Assignee)

Comment 3

13 years ago
Created attachment 226654 [details] [diff] [review]
With do_check_true
Attachment #226612 - Attachment is obsolete: true
Attachment #226654 - Flags: review?(davel)
Attachment #226612 - Flags: review?(davel)

Updated

13 years ago
Attachment #226654 - Flags: review?(davel) → review+
(Assignee)

Comment 4

13 years ago
Checked in.  Thanks!
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

12 years ago
Er, actually checked in now for real.
You need to log in before you can comment on or make changes to this bug.