Improved line number handling for unit test failure errors

db4
Slava Pestov 2009-09-08 13:13:30 -05:00
parent c707ba5d61
commit 2d46cfdf9e
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ T{ error-type
SYMBOL: file
: file-failure ( error -- )
f file get f failure ;
[ f file get ] keep error-line failure ;
:: (unit-test) ( output input -- error ? )
[ { } input with-datastack output assert-sequence= f f ] [ t ] recover ;

View File

@ -97,7 +97,7 @@ M: error-renderer column-titles
M: error-renderer column-alignment drop { 0 1 0 0 } ;
: sort-errors ( seq -- seq' )
[ [ [ line#>> ] [ asset>> unparse-short ] bi 2array ] keep ] { } map>assoc
[ [ [ line#>> 0 or ] [ asset>> unparse-short ] bi 2array ] keep ] { } map>assoc
sort-keys values ;
: file-matches? ( error pathname/f -- ? )