From: Thomas M. Hermann Date: Mon, 15 Oct 2012 15:55:33 +0000 (-0500) Subject: Use the string name of the test for documentation if none provided. X-Git-Tag: 0.9.4~30 X-Git-Url: https://repo.or.cz/w/lisp-unit.git/commitdiff_plain/f96804287925e93bd978face0285b051462aa29d Use the string name of the test for documentation if none provided. --- diff --git a/lisp-unit.lisp b/lisp-unit.lisp index 46e44d3..11debc6 100644 --- a/lisp-unit.lisp +++ b/lisp-unit.lisp @@ -224,11 +224,11 @@ assertion.") (defmacro define-test (name &body body) "Store the test in the test database." (multiple-value-bind (doc tag code) (parse-body body) - `(progn + `(let ((doc (or ,doc (string ',name)))) (setf ;; Unit test (gethash ',name (package-table *package* t)) - (make-instance 'unit-test :doc ,doc :code ',code)) + (make-instance 'unit-test :doc doc :code ',code)) ;; Tags (loop for tag in ',tag do (pushnew