From a90dfb5360f6f4a9392096f1082726e8be69de63 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 18 Nov 2019 22:45:25 -0800 Subject: [PATCH] On error, show a condition report instead of a condition object. --- src/libraries/inline-testing.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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" -- 2.25.1