From: Chris Hanson Date: Tue, 19 Nov 2019 06:45:25 +0000 (-0800) Subject: On error, show a condition report instead of a condition object. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~4 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a90dfb5360f6f4a9392096f1082726e8be69de63;p=mit-scheme.git On error, show a condition report instead of a condition object. --- diff --git a/src/libraries/inline-testing.scm b/src/libraries/inline-testing.scm index 760bf494a..700e6ea7a 100644 --- a/src/libraries/inline-testing.scm +++ b/src/libraries/inline-testing.scm @@ -64,6 +64,7 @@ USA. call-with-output-string call-with-truncated-output-string call-with-truncated-output-string + condition/report-string condition? default-object default-object? @@ -288,7 +289,7 @@ USA. (define (show-failing-result failure) (newline) (newline) - (display "evaluating ") + (display "evaluating") (newline) (pp (car failure)) (display "failed the following expectations:") @@ -331,7 +332,7 @@ USA. (lambda (context . args) (if (context 'is-error?) (string-append "Expected non-error but instead got error: " - (write-to-string (context 'get-condition))) + (condition/report-string (context 'get-condition))) (apply handler (context 'get-value) args))))) (define (define-output-expectation keyword n-args handler) @@ -339,7 +340,7 @@ USA. (lambda (context . args) (if (context 'is-error?) (string-append "Expected non-error but instead got error: " - (write-to-string (context 'get-condition))) + (condition/report-string (context 'get-condition))) (let ((objects (read-objects (context 'get-port)))) (if (condition? objects) "Error while reading output"