X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=suite.lisp;h=4592100637ad30c018cce32e270f7b4449ddcc7f;hb=0114e93940d17c3dd840f37a81d6fb0da66e7a25;hp=f2394abecf65b106b677ce896e2776d0ba480dee;hpb=6e195606e06173086a91616042adef3072633d92;p=xlunit.git diff --git a/suite.lisp b/suite.lisp index f2394ab..4592100 100644 --- a/suite.lisp +++ b/suite.lisp @@ -2,7 +2,7 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; ID: $Id: suite.lisp,v 1.6 2003/08/04 19:31:34 kevin Exp $ +;;;; ID: $Id: suite.lisp,v 1.8 2003/08/06 11:37:23 kevin Exp $ ;;;; Purpose: Suite functions for XLUnit ;;;; ;;;; ************************************************************************* @@ -42,7 +42,7 @@ (setf (tests suite) (delete-if #'(lambda (existing-tests-or-suite) (cond ((typep existing-tests-or-suite 'test-suite) - (eq existing-tests-or-suite new-test)) + (eq existing-tests-or-suite test)) ((typep existing-tests-or-suite 'test-case) (eql (name existing-tests-or-suite) (name test))))) @@ -69,22 +69,8 @@ This is used to dynamically generate a list of tests for a fixture." (nreverse res))) -;---------------------------------------------------------------------- -; macro def-test-method -; -; Creates the representation of a test method (included within a -; test-case object) and add it to the corresponding suite class. -; => clos version of the pluggable selector pattern -; -; use: (def-test-method test-assert-false (clos-unit-test) -; (assert-true (eql (+ 1 2) 4) "comment")) -; -; new: it calls the textui-test-run function during eval, so to -; allow the usual lisp-like incremental developing and test. -;---------------------------------------------------------------------- - -(defmacro def-test-method ((method-name instance-name class-name - &key (run t)) +(defmacro def-test-method (method-name ((instance-name class-name) + &key (run t)) &body method-body) `(let ((,instance-name (make-instance ',class-name @@ -94,4 +80,3 @@ This is used to dynamically generate a list of tests for a fixture." (add-test (suite ,instance-name) ,instance-name) (when ,run (textui-test-run ,instance-name)))) -