• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excessive / cpml / 1

31 Mar 2022 01:05PM UTC coverage: 44.185% (-13.5%) from 57.717%
1

push

github

web-flow
Merge pull request #75 from idbrii/precond

Include offending type in precondition failure msg

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

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/modules/_private_precond.lua
1
-- Preconditions for cpml functions.
2
local precond = {}
6,237✔
3

11✔
4

5
function precond.typeof(t, expected, msg)
6,237✔
6
        if type(t) ~= expected then
555,122✔
NEW
7
                error(("%s: %s (<%s> expected)"):format(msg, type(t), expected), 3)
979✔
8
        end
9
end
10

11
function precond.assert(cond, msg, ...)
6,215✔
12
        if not cond then
202,836✔
NEW
13
                error(msg:format(...), 3)
1,074✔
14
        end
15
end
16

17
return precond
6,204✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc