tools.coverage: change test-coverage to not test recursively.
parent
a4aa9a9688
commit
27c86672eb
|
@ -1,10 +1,10 @@
|
||||||
! Copyright (C) 2011 Doug Coleman.
|
! Copyright (C) 2011 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs fry io kernel math prettyprint
|
USING: accessors arrays assocs classes combinators
|
||||||
quotations sequences sequences.deep splitting strings
|
combinators.short-circuit continuations fry io kernel math
|
||||||
tools.annotations vocabs words arrays words.symbol
|
namespaces prettyprint quotations sequences sequences.deep
|
||||||
combinators.short-circuit namespaces tools.test
|
splitting strings tools.annotations tools.test
|
||||||
combinators continuations classes ;
|
tools.test.private vocabs words words.symbol ;
|
||||||
IN: tools.coverage
|
IN: tools.coverage
|
||||||
|
|
||||||
TUPLE: coverage-state < identity-tuple executed? ;
|
TUPLE: coverage-state < identity-tuple executed? ;
|
||||||
|
@ -121,17 +121,14 @@ PRIVATE>
|
||||||
dup '[
|
dup '[
|
||||||
[
|
[
|
||||||
_
|
_
|
||||||
[ coverage-on test coverage-off ]
|
[ coverage-on test-vocab coverage-off ]
|
||||||
[ coverage ] bi
|
[ coverage ] bi
|
||||||
] [ _ remove-coverage ] [ ] cleanup
|
] [ _ remove-coverage ] [ ] cleanup
|
||||||
] call
|
] call
|
||||||
] bi ;
|
] bi ;
|
||||||
|
|
||||||
: test-coverage-recursively ( vocab -- assoc )
|
: test-coverage-recursively ( prefix -- assoc )
|
||||||
child-vocabs [
|
child-vocabs [ dup test-coverage ] { } map>assoc ;
|
||||||
dup test-coverage
|
|
||||||
] { } map>assoc ;
|
|
||||||
|
|
||||||
|
|
||||||
: %coverage ( string -- x )
|
: %coverage ( string -- x )
|
||||||
[ test-coverage values concat length ]
|
[ test-coverage values concat length ]
|
||||||
|
|
Loading…
Reference in New Issue