anchor.diff:  
   
   (defgeneric test-setup-function (test)
  -  ;; trivial test setup protocol
  +  ;; funtional test setup protocol
     ;;
     ;; (values (or null function) boolean)
     ;;
  
positive.code:   (test-failed (c)
      (format* "NOT OK ~S" c)))
  
  #+PROTOTYPE
  (progn
  
    ;; setup forms
  
negative.code:     (cond
        ((slot-boundp test 'cleanup-function)
         (values (test-cleanup-function test) t))
        (t (values nil nil)))))
  
  (defgeneric do-test-setup (goal test)
    (:method (goal (test function))
      (declare (ignore goal test))
      (values))
  
    (:method (goal (test test))
      (multiple-value-bind (fn setup-p)
          (test-setup-function test)
        (when setup-p
          (funcall fn goal test)))))
  
  (defgeneric do-test-cleanup (goal test)
    (:method (goal (test function))
      (declare (ignore goal test))
      (values nil))
  
    (:method (goal (test test))
      (multiple-value-bind (fn cleanup-p)
          (test-cleanup-function test)
        (when cleanup-p
          (funcall fn goal test)))))
  
  
  (defgeneric do-test  (goal test)
    (:method ((goal list) (test function))
      ;; Convenience method for simple inline tests
      ;;
      ;; e.g
      ;;
      ;;   (do-test '((2 2) (4)) #'expt)
      ;;
      ;;   (do-test '((2 2) (4)) #'expt #'=)
      (destructuring-bind (params expect 
                                  &optional 
                                  (predicate
                                   %default-equivalence-function%))
          goal
        (let ((g (make-instance 'lisp-test-goal
                                :parameters params
                                :expect  expect
                                :predicate predicate))
              (test (make-instance 'functional-test 
                                   :object test
                                   :lambda
                                   `(lambda ()
                                      (funcall ,test ,@params)))))
          (do-test g test)))))
  
  
  ;; FIXME: re-order the DO-TEST lambda list => (TEST GOAL) ?
  
  (defmethod  do-test :around ((goal lisp-test-goal) test)
    ;; FIXME: should (setf (test-utility-test goal) test) in this method?
    (macrolet ((record-at-phase (phase test goal record)
                 (let ((app (intern (format* "~A-~A"
                                             (quote #:do-test)
                                             phase)))
                       (rec (intern (format* "~A-~A-~A"
                                             (quote #:test)
                                             phase
                                             (quote #:results)))))
                   (with-gensym (%test %goal %record results)
                   `(let* ((,%test ,test)
                           (,%goal ,goal)
                           (,%record ,record)
                           (,results))
                      (unwind-protect
                           (setq ,results
                                 (with-flagged-eval ,%record
                                   (multiple-value-list
                                    (,app ,%goal ,%test))))
                        (setf (,rec ,%record) ,results))))))
  
               (with-flagged-eval (record &body body)
                 (with-gensym (c bounce %record)
                   `(macrolet
                        ((process-c (,c ,bounce ,%record)
                           `(progn 
                              (setf (test-condition ,,%record) ,,c)
                              (,,bounce ,,c))))
                      (handler-case 
                          (progn ,@body)
                        (error (,c) (process-c ,c error ,record))
                        ;; NOTE that this does not continue after the
                        ;; warning condition is captured, but simply
                        ;; stores the warning condition and calls WARN
                        ;; on the condition
                        (warning (,c) (process-c ,c warn ,record))
                        ;; FIXME if this may be too "fine grained" an
                        ;; approach, to capture all CONDITION
                        ;; occurrences
                        (condition (,c) (process-c ,c signal ,record)))))))
  
      (let ((record (ensure-test-record test goal)))
        (record-at-phase #:setup test goal record)
        (let ((results
               (unwind-protect
                    (with-flagged-eval record
                      (multiple-value-list (call-next-method)))
                 ;; Note that method dispatching, by defualt,
                 ;; would not encapsulate CALL-NEXT-METHOD within
                 ;; an UNWIND-PROTECT form.
                 ;;
                 ;; Note also that this results in the
                 ;; TEST-CLEANUP-RESULTS property being set into the
                 ;; RECORD object, before the TEST-RESULTS property is set
                 (record-at-phase #:cleanup test goal record)))
              (pred (test-predicate goal)))
  
          (setf (test-main-results record) results)
  
          (signal (cond
                    ((funcall pred results expect) 
                     (quote test-succeeded))
                    (t (quote test-failed)))
                  :record record)
  
          (values record)))))
  
  
  ;; prototypes for test eval [AFFTA 1.2]
  ;;
  #+PROTOTYPE ;; AFFTA-1.2
  (handler-case
      (do-test '(2 2) '(4) #'expt)
    ;; ^ FIXME: use default NULL-TEST-SUITE with that DO-TEST eval
  