Closed Bug 377721 Opened 17 years ago Closed 17 years ago

add todo_is and todo_isnot to mochitest

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Having a todo version of mochitest's is function would make writing a bunch of the style system tests easier.  It's really useful to use "is", since then I get the incorrect result in the error message.  But I'm writing tests that iterate over a property database and have a bunch of known failures, so I want to be able to write things like this:

    var func = is;
    if (property in gKnownFails &&
        gKnownFails[property].indexOf(badval) != -1)
      func = todo_is;

    func(gDeclaration.getPropertyValue(property), "",
         "invalid value '" + badval + "' not accepted for '" + property +
         "' property");

(This is in the version of layout/style/test/test_property_syntax_errors.html that's in my tree.)

Thus, I'd like the following patch.

I'm not sure if we're doing anything to track changes we make to mochitest or to contribute them back -- if we are, what should I be doing?
Attachment #261739 - Flags: review?(sayrer)
Note that these are copies of is and isnot with "ok" replaced by "todo".  I should probably say that in a comment above them...
Attachment #261739 - Flags: review?(sayrer) → review+
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Component: Testing → Mochitest
Product: Core → Testing
QA Contact: testing → mochitest
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: