anchor.diff:      :accessor test-cleanup-function)
      ))
   
  +
  +(defmacro deftest (name (&rest args
  +                               &key (class 'diadic-predicate-test)
  +                               &allow-other-keys)
  +                                 body
  +                   &environment env)
  +    (macrolet ((pop-arg (name &optional errorp)
  +                 (with-gensum (v default)
  +                   `(let ((,v (getf args ,name (quote ,default))))
  +                      (cond
  +                        ((eq ,v (quote ,default))
  +                         (cond
  +                           ;; FIXME: #I18N
  +                           (errorp (error "Required argument ~S not provided: ~<~S~>"
  +                                          ,name args))
  +                           (t (values nil nil))))
  +                        (t (multiple-value-prog1 (values ,v t)
  +                             (setf args (delf args ,name)))))))))
  +      (labels ((mk-kwd (a b)
  +                 (intern (format nil "~A-~A" a b)
  +                         (quote #:keyword)))
  +               (lambda-if (arg)
  +                 (let ((form-arg (mk-kwd arg (quote #:form)))
  +                       (fn-arg (mk-kwd art (quote #:function))))
  +                   (multiple-value-bind (form foundp)
  +                       (pop-arg arg)
  +                     (when foundp
  +                       (list form-arg form
  +                             fn-arg `(lambda () ,@form)))))))
  +        (with-gensym (test)
  +          `(let ((,test (make-instance ,(pop-arg class t)
  +                                       ,@(lambda-if :setup)
  +                                       ,@(lambda-if :cleanup)
  +                                       ,@args
  +                                       :label (quote ,name)
  +                                       :environment ,env)))
  +             (register-test ,test)
  +             (vaules ,test))))))
  +
  +#+NIL
  +(deftest #:deftest-test ()
  +  (
  +))
  +
  +;; test output
  +
   (defmethod format-test-label ((test test) (stream stream))
  -  (let ((label ((labeled-object-label test))))
  +  (let ((label (labeled-object-label test)))
       (princ (or label %unnamed%)
              stream)))
   
  
positive.code:            (funcall (test-cleanup-function test)))))))
  
  
  (defclass values-test (labeled-object)
    ((expect-values
      :initarg :expect
      :accessor test-expect-values)
  
negative.code: 
  
  (defmethod format-test-condition ((condition test-succeeded)
                                    (stream stream))
    ;; FIXME/TO-DO: #I18N for condition/reporter format control strings
    (princ "Test succeeded" stream))
  