Commit b063464b authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix #9: Expose unexpected failures and successes

When `*expected-failures*` is set, RT will print out any unexpected
failures or successes.

This change adds `*unexpected-failures*` and `*unexpected-successes*`
to keep track of this failures or successes in addition to the having
them printed out.  Users can then inspect these easily to do something
based on the results.
parent 93b17f2e
......@@ -52,7 +52,10 @@
;; )
;; (in-package :regression-test)
......@@ -53,6 +53,12 @@
(defvar *expected-failures* nil
"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)
"A mapping from names of notes to note objects.")
......@@ -380,6 +386,7 @@
(if (null new-failures)
(format s "~&No unexpected failures.")
(when *expected-failures*
(setf *unexpected-failures* new-failures)
(format s "~&~A unexpected failures: ~
~:@(~{~<~% ~1:;~S~>~
~^, ~}~)."
......@@ -393,11 +400,13 @@
(loop :for ex :in *expected-failures*
:unless (gethash ex pending-table) :collect ex)))
(if unexpected-successes
(format t "~&~:D unexpected successes: ~
(setf *unexpected-successes* unexpected-successes)
(format t "~&~:D unexpected successes: ~
~:@(~{~<~% ~1:;~S~>~
~^, ~}~)."
(length unexpected-successes)
(length unexpected-successes)
(format t "~&No unexpected successes.")))))
(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