mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Address review comments.
This commit is contained in:
parent
9d82e06e64
commit
3cfe8ab53e
10 changed files with 92 additions and 121 deletions
|
@ -12,17 +12,17 @@ function expect(num) {
|
|||
function _fail(s, m) {
|
||||
_tests++;
|
||||
// string split to avoid problems with tests that end up printing the value of window._fail.
|
||||
console.log(_oneline("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m));
|
||||
window.alert(_oneline("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m));
|
||||
}
|
||||
|
||||
function _pass(s, m) {
|
||||
_tests++;
|
||||
//console.log(_oneline("TEST-PASS | " + s + ": " + m));
|
||||
window.alert(_oneline("TEST-PASS | " + s + ": " + m));
|
||||
}
|
||||
|
||||
function _printer(opstr, op) {
|
||||
return function (a, b, msg) {
|
||||
var f = op(a,b) ? _pass : _fail;
|
||||
let f = op(a,b) ? _pass : _fail;
|
||||
if (!msg) msg = "";
|
||||
f(a + " " + opstr + " " + b, msg);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue