Handbook
Glossary
test-coverage ( vocab -- coverage )
Coverage tool
Prev:
%coverage ( string -- x )
Next:
each-word ( string quot -- )
Vocabulary
tools
.
coverage
Inputs
vocab
a vocabulary specifier
Outputs
coverage
a
sequence
Word description
Enables code coverage for a vocabulary and runs its unit tests. The returned value is a sequence of pairs containing names and quotations which did not execute.
Definition
USING:
continuations
kernel
tools.test.private
;
IN:
tools.coverage
:
test-coverage
( vocab -- coverage )
[
add-coverage
]
[
dup
[
[
[
coverage-on
test-vocab
coverage-off
]
[
coverage
]
bi
]
curry
]
dip
[
remove-coverage
]
curry
[
finally
]
2curry
call
]
bi
;