anchor.diff:     (create
       (setf (gethash package *tag-db*) (make-hash-table)))
      (t (warn "No tags defined for package: ~S" package))))
  +
  +;;; Unit test definition
   
   (defclass unit-test ()
     ((doc
  
positive.code:     (y-or-n-p "~A -- debug?" condition))
     (*use-debugger*)))
  
  ;;; Failure control strings
  
  (defgeneric print-failure (result)
    (:documentation
     "Report the results of the failed assertion."))
  
  (defmethod print-failure :around (result)
    "Failure header and footer output."
    (format t "~& | Failed Form: ~S" (form result))
    (call-next-method)
    (when (extras result)
      (format t "~{~& | ~S => ~S~}~%"
              (funcall (extras result))))
    (format t "~& |~%")
    (class-name result))
  
  (defmethod print-failure (result)
    (format t "~& | Expected ~{~S~^; ~} " (expected result))
    (format t "~<~% | ~:;but saw ~{~S~^; ~}~>" (actual result)))
  
  (defmethod print-failure ((result error-result))
    (format t "~& | ~@[Should have signalled ~{~S~^; ~} but saw~]"
            (expected result))
    (format t " ~{~S~^; ~}" (actual result)))
  
  (defmethod print-failure ((result macro-result))
    (format t "~& | Should have expanded to ~{~S~^; ~} "
            (expected result))
    (format t "~<~%~:;but saw ~{~S~^; ~}~>" (actual result)))
  
  (defmethod print-failure ((result output-result))
    (format t "~& | Should have printed ~{~S~^; ~} "
            (expected result))
    (format t "~<~%~:;but saw ~{~S~^; ~}~>"
            (actual result)))
  
  (defgeneric print-error (condition)
    (:documentation
     "Print the error condition."))
  
  (defmethod print-error (condition)
    "Print the error condition."
    (let ((*print-escape* nil))
      (format t "~& | Execution error:~% | ~W" condition)
      (format t "~& |~%")))
  
  (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
  
  (defparameter *test-db* (make-hash-table :test #'eq)
  
negative.code:             (length (missing-tests results)))))
  
  ;;; Run the tests
  
  (defun %run-all-thunks (&optional (package *package*))
    "Run all of the test thunks in the package."
  