aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-11-02 17:45:42 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-11-16 00:51:19 +0100
commit3e256531020f915f3cc795d4ccf2fcae44299c25 (patch)
treebc844d2ff6666a87ae80ff74013b301f9f9890d6
parentFix wordy numbers in swedish! (diff)
downloadcalp-3e256531020f915f3cc795d4ccf2fcae44299c25.tar.gz
calp-3e256531020f915f3cc795d4ccf2fcae44299c25.tar.xz
Testrunner: Better messages on XPASS.
-rw-r--r--module/hnh/test/testrunner.scm35
1 files changed, 22 insertions, 13 deletions
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))))