push
github
50 of 60 new or added lines in 6 files covered. (83.33%)
205 existing lines in 6 files now uncovered.76716 of 173626 relevant lines covered (44.18%)
1272.48 hits per line
| 1 |
-- Preconditions for cpml functions.
|
|
|
|
local precond = {} |
6,237✔ |
| 3 |
|
11✔ |
| 4 |
|
|
|
|
function precond.typeof(t, expected, msg) |
6,237✔ |
|
|
if type(t) ~= expected then |
555,122✔ |
|
NEW
|
error(("%s: %s (<%s> expected)"):format(msg, type(t), expected), 3) |
979✔ |
| 8 |
end
|
|
| 9 |
end
|
|
| 10 |
|
|
|
|
function precond.assert(cond, msg, ...) |
6,215✔ |
|
|
if not cond then |
202,836✔ |
|
NEW
|
error(msg:format(...), 3) |
1,074✔ |
| 14 |
end
|
|
| 15 |
end
|
|
| 16 |
|
|
|
|
return precond
|
6,204✔ |