mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
auto merge of #953 : saneyuki/servo/test, r=jdm
This commit is contained in:
commit
4f8b20ecc1
1 changed files with 7 additions and 6 deletions
|
@ -1,15 +1,16 @@
|
|||
function _fail(s) {
|
||||
function _fail(s, m) {
|
||||
// string split to avoid problems with tests that end up printing the value of window._fail.
|
||||
window.alert("TEST-UNEXPECTED" + "-FAIL | " + s);
|
||||
window.alert("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m);
|
||||
}
|
||||
|
||||
function _pass(s) {
|
||||
window.alert("TEST-PASS | " + s);
|
||||
function _pass(s, m) {
|
||||
window.alert("TEST-PASS | " + s + ": " + m);
|
||||
}
|
||||
|
||||
function is(a, b) {
|
||||
function is(a, b, c) {
|
||||
let f = a != b ? _fail : _pass;
|
||||
f(a + " == " + b);
|
||||
let m = !c ? "" : c;
|
||||
f(a + " == " + b, m);
|
||||
}
|
||||
|
||||
var _test_complete = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue