 TEST: must-fail
 
 M: test-failure summary
-    [ asset>> experiment. ] with-string-writer ;
+    asset>> [ [ experiment. ] with-string-writer ] [ "Top-level form" ] if* ;
 
 M: test-failure error. ( error -- )
     [ call-next-method ]

>>

: run-test-file ( path -- )
    [ [ test-failures get ] dip '[ file>> _ = not ] filter-here ]
    [ [ run-file ] [ swap file-failure ] recover ] bi ;

: run-vocab-tests ( vocab -- )
    dup vocab source-loaded?>> [

    "--> test failed!" print
    <test-failure> test-failures get push ;

SYMBOL: file

: file-failure ( error -- )
    f file get f failure ;

:: (unit-test) ( output input -- error ? )
    [ { } input with-datastack output assert-sequence= f f ] [ t ] recover ; inline
