test-coverage ( vocab -- coverage )
Coverage tool
Prev:%coverage ( string -- x )
Next:each-word ( string quot -- )


Vocabulary
tools.coverage

Inputs and outputs
vocaba vocabulary specifier
coveragea sequence


Word description
Enables code coverage for a vocabulary and activates it for the unit tests only. The returned value is a sequence of pairs containing names and quotations which did not execute.

Definition
USING: continuations kernel tools.test ;

IN: tools.coverage

: test-coverage ( vocab -- coverage )
[ add-coverage ] [
dup [
[
[ coverage-on test coverage-off ] [ coverage ]
bi
] curry
] dip [ remove-coverage ] curry [ [ ] cleanup ] 2curry
call
] bi ;