]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/coverage/testvocab/testvocab.factor
d6f83c2eb729b12dc5f2be20652221301bc8dee1
[factor.git] / basis / tools / coverage / testvocab / testvocab.factor
1 ! Copyright (C) 2014 Jon Harper.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators fry kernel macros math sequences ;
4 IN: tools.coverage.testvocab
5
6 <PRIVATE
7
8 : testifprivate ( ? -- ) [ ] [ ] if ;
9
10 PRIVATE>
11
12 : halftested ( ? -- ) [ ] [ ] if ;
13 : testif ( ? -- ) [ ] [ ] if ;
14 : testcond ( n -- n ) {
15   { [ dup 0 = ] [ ] }
16   { [ dup 1 = ] [ ] }
17   [ ]
18 } cond ;
19
20 MACRO: mconcat ( seq -- quot ) concat ;
21 : testmacro ( a b -- )
22     { [ 2dup ] [ <= [ ] [ ] if ] [ > [ ] [ ] if ] } mconcat ;
23
24 : testfry ( ? -- )
25   '[ _ [ ] [ ] if ] call ;
26
27 : untested ( -- ) ;
28
29 SYMBOL: not-a-coverage-word