From 3e256531020f915f3cc795d4ccf2fcae44299c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 2 Nov 2023 17:45:42 +0100 Subject: Testrunner: Better messages on XPASS. --- module/hnh/test/testrunner.scm | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'module/hnh/test/testrunner.scm') diff --git a/module/hnh/test/testrunner.scm b/module/hnh/test/testrunner.scm index a45bd421..d181796e 100644 --- a/module/hnh/test/testrunner.scm +++ b/module/hnh/test/testrunner.scm @@ -100,19 +100,28 @@ (when (or (verbose?) #;(eq? 'fail (test-result-kind))) (format #t " ~a~%" (test-runner-test-name/description runner))) - (when (eq? 'fail (test-result-kind)) - (enqueue! - (with-output-to-string - (lambda () - (display - (yellow (format #f "Test failed: ~a~%" - (test-runner-test-name/description runner)))) - (display - (yellow - (format #f " Path: ~s~%" - (cdr (test-runner-group-path runner))))) - (test-runner-describe-error runner 0))) - err-queue)) + (case (test-result-kind) + ((fail) + (enqueue! + (with-output-to-string + (lambda () + (display + (yellow (format #f "Test failed: ~a~%" + (test-runner-test-name/description runner)))) + (display + (yellow + (format #f " Path: ~s~%" + (cdr (test-runner-group-path runner))))) + (test-runner-describe-error runner 0))) + err-queue)) + ((xpass) + (enqueue! + (string-append + (yellow (format #f "Test unexpectedly passed: ~a~%" + (test-runner-test-name/description runner))) + (format #f " Path: ~s~%" + (cdr (test-runner-group-path runner)))) + err-queue))) (let ((start (test-runner-aux-value runner)) (end (transform-time-of-day (gettimeofday)))) -- cgit v1.2.3