bug 413416: implement todo_is and todo_isnot for MochiTest browser chrome harness; r=gavin, a=beltzner
git-svn-id: svn://10.0.0.236/trunk@244020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -125,6 +125,13 @@ function testScope(aTests) {
|
||||
this.todo = function test_todo(condition, name, diag) {
|
||||
self.tests.push(new testResult(!condition, name, diag, true));
|
||||
}
|
||||
this.todo_is = function test_todo_is(a, b, name) {
|
||||
self.todo(a == b, name, "Got " + a + ", expected " + b);
|
||||
},
|
||||
this.todo_isnot = function test_todo_isnot(a, b, name) {
|
||||
self.todo(a != b, name, "Didn't expect " + a + ", but got it");
|
||||
},
|
||||
|
||||
this.waitForExplicitFinish = function test_WFEF() {
|
||||
self.done = false;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,6 @@ function test() {
|
||||
is(true, false, "fail is");
|
||||
isnot(true, true, "fail isnot");
|
||||
todo(true, "fail todo");
|
||||
todo_is(true, true, "fail todo_is");
|
||||
todo_isnot(true, false, "fail todo_isnot");
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
function test() {
|
||||
is(true, true, "pass is");
|
||||
ok(true, "pass ok");
|
||||
is(true, true, "pass is");
|
||||
isnot(false, true, "pass isnot");
|
||||
todo(false, "pass todo");
|
||||
todo_is(false, true, "pass todo_is");
|
||||
todo_isnot(true, true, "pass todo_isnot");
|
||||
|
||||
var func = is;
|
||||
func(true, true, "pass indirect is");
|
||||
|
||||
Reference in New Issue
Block a user