mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
summarize test results
This commit is contained in:
parent
08b285515b
commit
ffdbf9b5cd
@ -1,7 +1,12 @@
|
||||
var fails = [], passes=[];
|
||||
|
||||
function test(desc, actual, expected)
|
||||
{
|
||||
if (expected == actual)
|
||||
if (expected == actual) {
|
||||
passes.push(desc);
|
||||
return print(desc, ": passed");
|
||||
}
|
||||
fails.push(desc);
|
||||
print(desc, ": FAILED: expected", typeof(expected), "(", expected, ") != actual",
|
||||
typeof(actual), "(", actual, ")");
|
||||
}
|
||||
@ -234,8 +239,13 @@ function call()
|
||||
q3 += glob_f1();
|
||||
q4 += o.f();
|
||||
q5 += glob_f2();
|
||||
}
|
||||
}
|
||||
var ret = [q1, q2, q3, q4, q5];
|
||||
return ret;
|
||||
}
|
||||
test("call", call(), "100,100,100,100,100");
|
||||
|
||||
if (passes.length)
|
||||
print("pass:", passes.join(","));
|
||||
if (fails.length)
|
||||
print("FAIL:", fails.join(","));
|
||||
|
Loading…
Reference in New Issue
Block a user