Address review comments.

This commit is contained in:
Josh Matthews 2014-12-12 12:58:42 -05:00
parent 9d82e06e64
commit 3cfe8ab53e
10 changed files with 92 additions and 121 deletions

View file

@ -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);
};