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
Keith Lazuka 2009-09-30 16:58:07 -04:00
parent 7484bb73ae
commit 6e12c254ef
1 changed files with 5 additions and 1 deletions

View File

@ -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