diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index 579ca98c41..dc99443853 100644 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -214,14 +214,13 @@ M: condition error-help error>> error-help ; M: assert summary drop "Assertion failed" ; -M: assert error. - "Assertion failed" print +M: assert-sequence summary drop "Assertion failed" ; + +M: assert-sequence error. standard-table-style [ - 15 length-limit set - 5 line-limit set - [ expect>> [ [ "Expect:" write ] with-cell pprint-cell ] with-row ] - [ got>> [ [ "Got:" write ] with-cell pprint-cell ] with-row ] bi - ] tabular-output nl ; + [ "=== Expected:" print expected>> stack. ] + [ "=== Got:" print got>> stack. ] bi + ] tabular-output ; M: immutable summary drop "Sequence is immutable" ; diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index b614c15150..79195d1938 100755 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -568,8 +568,10 @@ M: sequence <=> 2dup [ length ] bi@ = [ mismatch not ] [ 2drop f ] if ; inline +ERROR: assert-sequence got expected ; + : assert-sequence= ( a b -- ) - 2dup sequence= [ 2drop ] [ assert ] if ; + 2dup sequence= [ 2drop ] [ assert-sequence ] if ; : sequence-hashcode-step ( oldhash newpart -- newhash ) >fixnum swap [