tools.test: run-test-file is public now, fix no-method error if unit test forgets a vocab

db4
Slava Pestov 2010-02-01 17:09:57 +13:00
parent 98a71d3521
commit 823e2fd3e9
1 changed files with 8 additions and 2 deletions

View File

@ -110,15 +110,21 @@ SYNTAX: TEST:
>> >>
PRIVATE>
: run-test-file ( path -- ) : run-test-file ( path -- )
dup file [ dup file [
test-failures get file get +test-failure+ delete-file-errors test-failures get file get +test-failure+ delete-file-errors
'[ _ run-file ] [ file-failure ] recover '[ _ run-file ] [ file-failure ] recover
] with-variable ; ] with-variable ;
<PRIVATE
: run-vocab-tests ( vocab -- ) : run-vocab-tests ( vocab -- )
dup vocab source-loaded?>> [ vocab dup [
vocab-tests [ run-test-file ] each dup source-loaded?>> [
vocab-tests [ run-test-file ] each
] [ drop ] if
] [ drop ] if ; ] [ drop ] if ;
PRIVATE> PRIVATE>