Commit b7f1f824 authored by pfdietz's avatar pfdietz
Browse files

Added *passing-tests*, *failing-tests* vars, which are set by do-tests

parent 0342cfe2
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
#:defnote #:defnote
#:my-aref #:my-aref
#:*catch-errors* #:*catch-errors*
#:*passed-tests*
#:*failed-tests*
#:disable-note)))))) #:disable-note))))))
;; ) ;; )
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
(defvar *expanded-eval* nil "When true, convert the tests into a form that is less likely to have compiler optimizations.") (defvar *expanded-eval* nil "When true, convert the tests into a form that is less likely to have compiler optimizations.")
(defvar *optimization-settings* '((safety 3))) (defvar *optimization-settings* '((safety 3)))
(defvar *failed-tests* nil "After DO-TESTS, becomes the list of names of tests that have failed")
(defvar *passed-tests* nil "After DO-TESTS, becomes the list of names of tests that have passed")
(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.")
...@@ -270,12 +273,11 @@ ...@@ -270,12 +273,11 @@
(handler-case (handler-case
(let ((st (format nil "Actual value~P: ~ (let ((st (format nil "Actual value~P: ~
~{~S~^~%~15t~}.~%" ~{~S~^~%~15t~}.~%"
(length r) r))) (length r) r)))
(format s "~A" st)) (format s "~A" st))
(error () (format s "Actual value: #<error during printing>~%") (error () (format s "Actual value: #<error during printing>~%")
)) ))
(finish-output s) (finish-output s)))))
))))
(when (not (pend entry)) *test*)) (when (not (pend entry)) *test*))
(defun expanded-eval (form) (defun expanded-eval (form)
...@@ -321,6 +323,8 @@ ...@@ -321,6 +323,8 @@
(defun do-tests (&optional (defun do-tests (&optional
(out *standard-output*)) (out *standard-output*))
(setq *failed-tests* nil
*passed-tests* nil)
(dolist (entry (cdr *entries*)) (dolist (entry (cdr *entries*))
(setf (pend entry) t)) (setf (pend entry) t))
(if (streamp out) (if (streamp out)
...@@ -338,8 +342,11 @@ ...@@ -338,8 +342,11 @@
(dolist (entry (cdr *entries*)) (dolist (entry (cdr *entries*))
(when (and (pend entry) (when (and (pend entry)
(not (has-disabled-note entry))) (not (has-disabled-note entry)))
(format s "~@[~<~%~:; ~:@(~S~)~>~]" (let ((success? (do-entry entry s)))
(do-entry entry s)) (if success?
(push (name entry) *passed-tests*)
(push (name entry) *failed-tests*))
(format s "~@[~<~%~:; ~:@(~S~)~>~]" success?))
(finish-output s) (finish-output s)
)) ))
(let ((pending (pending-tests)) (let ((pending (pending-tests))
......
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