Print unit test failures better
parent
2abdf4c138
commit
73a2e81953
|
@ -214,14 +214,13 @@ M: condition error-help error>> error-help ;
|
||||||
|
|
||||||
M: assert summary drop "Assertion failed" ;
|
M: assert summary drop "Assertion failed" ;
|
||||||
|
|
||||||
M: assert error.
|
M: assert-sequence summary drop "Assertion failed" ;
|
||||||
"Assertion failed" print
|
|
||||||
|
M: assert-sequence error.
|
||||||
standard-table-style [
|
standard-table-style [
|
||||||
15 length-limit set
|
[ "=== Expected:" print expected>> stack. ]
|
||||||
5 line-limit set
|
[ "=== Got:" print got>> stack. ] bi
|
||||||
[ expect>> [ [ "Expect:" write ] with-cell pprint-cell ] with-row ]
|
] tabular-output ;
|
||||||
[ got>> [ [ "Got:" write ] with-cell pprint-cell ] with-row ] bi
|
|
||||||
] tabular-output nl ;
|
|
||||||
|
|
||||||
M: immutable summary drop "Sequence is immutable" ;
|
M: immutable summary drop "Sequence is immutable" ;
|
||||||
|
|
||||||
|
|
|
@ -568,8 +568,10 @@ M: sequence <=>
|
||||||
2dup [ length ] bi@ =
|
2dup [ length ] bi@ =
|
||||||
[ mismatch not ] [ 2drop f ] if ; inline
|
[ mismatch not ] [ 2drop f ] if ; inline
|
||||||
|
|
||||||
|
ERROR: assert-sequence got expected ;
|
||||||
|
|
||||||
: assert-sequence= ( a b -- )
|
: assert-sequence= ( a b -- )
|
||||||
2dup sequence= [ 2drop ] [ assert ] if ;
|
2dup sequence= [ 2drop ] [ assert-sequence ] if ;
|
||||||
|
|
||||||
: sequence-hashcode-step ( oldhash newpart -- newhash )
|
: sequence-hashcode-step ( oldhash newpart -- newhash )
|
||||||
>fixnum swap [
|
>fixnum swap [
|
||||||
|
|
Loading…
Reference in New Issue