Commit 32552808 authored by Daniel Kochmański's avatar Daniel Kochmański

Merge branch 'rtoy-issue-9-expose-unexpected-pass-fail' into 'master'

Fix #9: Expose unexpected failures and successes

Closes #9

See merge request !10
parents 93b17f2e b063464b
...@@ -52,7 +52,10 @@ ...@@ -52,7 +52,10 @@
#:*catch-errors* #:*catch-errors*
#:*passed-tests* #:*passed-tests*
#:*failed-tests* #:*failed-tests*
#:disable-note)))))) #:disable-note
#:*expected-failures*
#:*unexpected-failures*
#:*unexpected-successes*))))))
;; ) ;; )
;; (in-package :regression-test) ;; (in-package :regression-test)
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
(defvar *expected-failures* nil (defvar *expected-failures* nil
"A list of test names that are expected to fail.") "A list of test names that are expected to fail.")
(defvar *unexpected-successes* nil
"A list of tests that passed but were expected to fail.")
(defvar *unexpected-failures* nil
"A list of tests that failed but were not expected to fail.")
(defvar *notes* (make-hash-table :test 'equal) (defvar *notes* (make-hash-table :test 'equal)
"A mapping from names of notes to note objects.") "A mapping from names of notes to note objects.")
...@@ -380,6 +386,7 @@ ...@@ -380,6 +386,7 @@
(if (null new-failures) (if (null new-failures)
(format s "~&No unexpected failures.") (format s "~&No unexpected failures.")
(when *expected-failures* (when *expected-failures*
(setf *unexpected-failures* new-failures)
(format s "~&~A unexpected failures: ~ (format s "~&~A unexpected failures: ~
~:@(~{~<~% ~1:;~S~>~ ~:@(~{~<~% ~1:;~S~>~
~^, ~}~)." ~^, ~}~)."
...@@ -393,11 +400,13 @@ ...@@ -393,11 +400,13 @@
(loop :for ex :in *expected-failures* (loop :for ex :in *expected-failures*
:unless (gethash ex pending-table) :collect ex))) :unless (gethash ex pending-table) :collect ex)))
(if unexpected-successes (if unexpected-successes
(format t "~&~:D unexpected successes: ~ (progn
(setf *unexpected-successes* unexpected-successes)
(format t "~&~:D unexpected successes: ~
~:@(~{~<~% ~1:;~S~>~ ~:@(~{~<~% ~1:;~S~>~
~^, ~}~)." ~^, ~}~)."
(length unexpected-successes) (length unexpected-successes)
unexpected-successes) unexpected-successes))
(format t "~&No unexpected successes."))))) (format t "~&No unexpected successes.")))))
)) ))
(finish-output s) (finish-output s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment