3 ! Some of these words should be moved to the standard library.
23 [ "Assertion failed!" throw ] unless ;
25 : print-test ( input output -- )
26 "TESTING: " write 2list . ;
28 : unit-test ( output input -- )
30 swap >r >r clear r> call datastack vector>list r> = assert ;
32 : test-word ( output input word -- )
36 : do-not-test-word ( output input word -- )
37 #! Flag for tests that are known not to work.
41 #! Evaluates the given code and prints the time taken to
43 millis >r call millis r> - . ;
47 "/library/test/" swap ".factor" cat3 run-resource ;
50 "Running Factor test suite..." print
51 "vocabularies" get [ f "scratchpad" set ] bind