anchor.diff:      :type list
       :initform ()
       :accessor missing-tests))
  -  (:default-initargs :test-names ())
     (:documentation
      "Store the results of the tests for further evaluation."))
   
  -(defmethod print-object ((object test-results) stream)
  +(defmethod print-object ((object test-results-db) stream)
     "Print the summary counts with the object."
  -  (format stream "#<~A Total(~D) Passed(~D) Failed(~D) Errors(~D)>~%"
  -          (class-name (class-of object))
  -          (+ (pass object) (fail object))
  -          (pass object) (fail object) (exerr object)))
  +  (let ((pass (pass object))
  +        (fail (fail object))
  +        (exerr (exerr object)))
  +    (format
  +     stream "#<~A Total(~D) Passed(~D) Failed(~D) Errors(~D)>~%"
  +     (class-name (class-of object))
  +     (+ pass fail) pass fail exerr)))
  +
  +(defun test-names (test-results-db)
  +  "Return a list of the test names in the database."
  +  (loop for name being each hash-key in (database test-results-db)
  +        collect name))
   
   (defun record-result (test-name code results)
     "Run the test code and record the result."
  -  (multiple-value-bind (pass fail exerr)
  -      (run-test-thunk code)
  -    (push test-name (test-names results))
  +  (let ((result (run-test-thunk code)))
  +    ;; Store the result
  +    (setf (gethash test-name (database results)) result)
       ;; Count passed tests
  -    (when (plusp pass)
  -      (incf (pass results) pass))
  -    ;; Count failed tests and record name
  -    (when (plusp fail)
  -      (incf (fail results) fail)
  +    (when (pass result)
  +      (incf (pass results) (length (pass result))))
  +    ;; Count failed tests and record the name
  +    (when (fail result)
  +      (incf (fail results) (length (fail result)))
         (push test-name (failed-tests results)))
  -    ;; Count errors and record name
  -    (when exerr
  +    ;; Count errors and record the name
  +    (when (exerr result)
         (incf (exerr results))
  -      (push test-name (error-tests results)))
  -    ;; Print a summary of the results
  -    (when (or *print-summary* *print-failures* *print-errors*)
  -      (print-summary
  -       test-name pass fail (when exerr 1)))))
  +      (push test-name (error-tests results)))))
   
   (defun summarize-results (results)
     "Print a summary of all results."
  
positive.code: 
  ;;; Run the tests
  
  (defun run-code (code)
    "Run the code to test the assertions."
    (funcall (coerce `(lambda () ,@code) 'function)))
  
  (defun run-test-thunk (code)
    (let ((*pass* 0)
          (*fail* 0))
      (handler-bind
          ((error (lambda (condition)
                    (when *print-errors*
                      (print-error condition))
                    (if (use-debugger-p condition)
                        condition
                        (return-from run-test-thunk
                          (values *pass* *fail* condition))))))
        (run-code code))
      ;; Return the result count
      (values *pass* *fail* nil)))
  
  (defun %run-all-thunks (&optional (package *package*))
    "Run all of the test thunks in the package."
    (loop
     with results = (make-instance 'test-results)
     for test-name being each hash-key in (package-table package)
     using (hash-value unit-test)
     if unit-test do
  
negative.code: (defun print-summary (name pass fail &optional exerr)
    "Print a summary of the test results."
    (format t "~&~A: ~S assertions passed, ~S failed"
            name (length pass) (length fail))
    (format t "~@[, ~S execution errors~].~2%" exerr))
  
  ;;; Global unit test database
  