auto merge of #953 : saneyuki/servo/test, r=jdm

This commit is contained in:
bors-servo 2013-09-21 07:54:45 -07:00
commit 4f8b20ecc1

View file

@ -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. // 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) { function _pass(s, m) {
window.alert("TEST-PASS | " + s); window.alert("TEST-PASS | " + s + ": " + m);
} }
function is(a, b) { function is(a, b, c) {
let f = a != b ? _fail : _pass; let f = a != b ? _fail : _pass;
f(a + " == " + b); let m = !c ? "" : c;
f(a + " == " + b, m);
} }
var _test_complete = false; var _test_complete = false;