Fix bugs in tools.test

db4
Slava Pestov 2008-02-08 01:49:05 -06:00
parent 52b5c5a068
commit 59cc83c296
1 changed files with 5 additions and 5 deletions

View File

@ -81,7 +81,7 @@ M: expected-error summary
"Traceback" swap third write-object ; "Traceback" swap third write-object ;
: test-failures. ( assoc -- ) : test-failures. ( assoc -- )
dup [ [
nl nl
dup empty? [ dup empty? [
drop drop
@ -90,15 +90,15 @@ M: expected-error summary
"==== FAILING TESTS:" print "==== FAILING TESTS:" print
[ [
swap vocab-heading. swap vocab-heading.
[ nl failure. nl ] each [ failure. nl ] each
] assoc-each ] assoc-each
] if ] if
] [ ] [
drop "==== NOTHING TO TEST" print "==== NOTHING TO TEST" print
] if ; ] if* ;
: run-tests ( prefix -- failures ) : run-tests ( prefix -- failures )
child-vocabs dup empty? [ f ] [ child-vocabs dup empty? [ drop f ] [
[ dup run-test ] { } map>assoc [ dup run-test ] { } map>assoc
[ second empty? not ] subset [ second empty? not ] subset
] if ; ] if ;