anchor.diff:      (when (or *print-summary* *print-failures* *print-errors*)
         (print-summary result))))
   
  -(defun summarize-results (results)
  -  "Print a summary of all results."
  +(defun summarize-results (results &optional
  +                          (stream *standard-output*))
  +  "Print a summary of all results to the stream."
     (let ((pass (pass results))
           (fail (fail results)))
  -    (format t "~&Unit Test Summary~%")
  -    (format t " | ~D assertions total~%" (+ pass fail))
  -    (format t " | ~D passed~%" pass)
  -    (format t " | ~D failed~%" fail)
  -    (format t " | ~D execution errors~%" (exerr results))
  -    (format t " | ~D missing tests~2%"
  +    (format stream "~&Unit Test Summary~%")
  +    (format stream " | ~D assertions total~%" (+ pass fail))
  +    (format stream " | ~D passed~%" pass)
  +    (format stream " | ~D failed~%" fail)
  +    (format stream " | ~D execution errors~%" (exerr results))
  +    (format stream " | ~D missing tests~2%"
               (length (missing-tests results)))))
   
   ;;; Run the tests
  +
  +(define-condition test-run-complete ()
  +  ((results
  +    :type 'test-results-db
  +    :initarg :results
  +    :reader results))
  +  (:documentation
  +   "Signaled when a test run is finished."))
   
   (defun %run-all-thunks (&optional (package *package*))
     "Run all of the test thunks in the package."
  
positive.code:   "Signal the results for extensibility."
    (setq *signal-results* flag))
  
  (define-condition test-run-complete ()
    ((results
      :initarg :results
      :reader results))
    (:documentation
     "Signaled when a test run is finished."))
  
  ;;; Global unit test database
  
  (defparameter *test-db* (make-hash-table :test #'eq)
  
negative.code:   (:documentation
     "Store the results of the unit test."))
  
  (defun print-summary (test-result &optional
                        (stream *standard-output*))
    "Print a summary of the test result."
    (format stream "~&~A: ~S assertions passed, ~S failed"
            (name test-result)
            (pass test-result)
            (length (fail test-result)))
    (if (exerr test-result)
        (format stream ", and an execution error.")
        (write-char #\. stream))
    (terpri stream)
    (terpri stream))
  
  (defun run-code (code)
    "Run the code to test the assertions."
  