adjust 86a91d675d
to bring back the "expression:" field of
a failed test or, in other words, make a top-level check-equal? more like a check-equal? inside a test-suite that runs in verbose mode (except that a top-level one limits the output to error-print-width characters, but the one inside a test-suite doesn't seem to do that)
This commit is contained in:
parent
0584d9ecf3
commit
19a87ffe13
|
@ -84,6 +84,11 @@
|
||||||
(location->string
|
(location->string
|
||||||
(check-info-value info)))
|
(check-info-value info)))
|
||||||
(λ (x) (printf "~a\n" x))))
|
(λ (x) (printf "~a\n" x))))
|
||||||
|
((check-expression? info)
|
||||||
|
(display-check-info-name-value max-name-width
|
||||||
|
(check-info-name info)
|
||||||
|
(check-info-value info)
|
||||||
|
(λ (x) (printf "~.s\n" x))))
|
||||||
(else
|
(else
|
||||||
(display-check-info-name-value max-name-width
|
(display-check-info-name-value max-name-width
|
||||||
(check-info-name info)
|
(check-info-name info)
|
||||||
|
@ -96,8 +101,7 @@
|
||||||
;; display-check-info-stack : (listof check-info) -> void
|
;; display-check-info-stack : (listof check-info) -> void
|
||||||
(define (display-check-info-stack check-info-stack)
|
(define (display-check-info-stack check-info-stack)
|
||||||
(display-verbose-check-info-stack
|
(display-verbose-check-info-stack
|
||||||
(filter (λ (x) (not (check-expression? x)))
|
(strip-redundant-params check-info-stack))
|
||||||
(strip-redundant-params check-info-stack)))
|
|
||||||
(newline))
|
(newline))
|
||||||
|
|
||||||
;; display-test-name : (U string #f) -> void
|
;; display-test-name : (U string #f) -> void
|
||||||
|
|
|
@ -49,6 +49,7 @@ FAILURE
|
||||||
name: check
|
name: check
|
||||||
location: standalone-check-test.rkt:48:0
|
location: standalone-check-test.rkt:48:0
|
||||||
params: (#<procedure:=> 1 2)
|
params: (#<procedure:=> 1 2)
|
||||||
|
expression: (check = 1 2)
|
||||||
message: 0.0
|
message: 0.0
|
||||||
|
|
||||||
Check failure
|
Check failure
|
||||||
|
@ -75,6 +76,7 @@ name: check-eq?
|
||||||
location: standalone-test-case-test.rkt:23:12
|
location: standalone-test-case-test.rkt:23:12
|
||||||
actual: 1
|
actual: 1
|
||||||
expected: 2
|
expected: 2
|
||||||
|
expression: (check-eq? 1 2)
|
||||||
|
|
||||||
Check failure
|
Check failure
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -85,6 +87,7 @@ name: check-eq?
|
||||||
location: standalone-test-case-test.rkt:24:21
|
location: standalone-test-case-test.rkt:24:21
|
||||||
actual: 1
|
actual: 1
|
||||||
expected: 2
|
expected: 2
|
||||||
|
expression: (check-eq? 1 2)
|
||||||
|
|
||||||
Check failure
|
Check failure
|
||||||
--------------------
|
--------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user