tools.test: added a verbose-tests? flag to control test experiment pprint verbosity
I needed this for my image decode unit tests because I don't want the test results to prettyprint big bitmap byte-arrays.db4
parent
7484bb73ae
commit
6e12c254ef
|
|
@ -79,8 +79,12 @@ MACRO: <experiment> ( word -- )
|
|||
[ name>> experiment-title ] bi
|
||||
'[ _ ndup _ narray _ prefix ] ;
|
||||
|
||||
SYMBOL: verbose-tests?
|
||||
t verbose-tests? set-global
|
||||
|
||||
: experiment. ( seq -- )
|
||||
[ first write ": " write ] [ rest . flush ] bi ;
|
||||
[ first write ": " write ]
|
||||
[ rest verbose-tests? get [ . ] [ short. ] if flush ] bi ;
|
||||
|
||||
:: experiment ( word: ( -- error ? ) line# -- )
|
||||
word <experiment> :> e
|
||||
|
|
|
|||
Loading…
Reference in New Issue