From 32647bbefaa857c797ba241ea14ff3bfe2c0ac95 Mon Sep 17 00:00:00 2001 From: Marco Baringer Date: Thu, 29 Nov 2012 11:56:54 +0100 Subject: [PATCH] Update the *suites* variable in make-suite, not def-suite. This ensures that *suites* is up to date even if we don't use def-suite to create the suite. --- src/suite.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/suite.lisp b/src/suite.lisp index 9aab2cc..2c1286d 100644 --- a/src/suite.lisp +++ b/src/suite.lisp @@ -31,11 +31,10 @@ DESCRIPTION is just a string. FIXTURE is the fixture argument (exactly like the :fixture argument to def-test) to pass to tests in this suite." `(eval-when (:compile-toplevel :load-toplevel :execute) - (setf (gethash ',name *suites*) - (make-suite ',name - ,@(when description `(:description ,description)) - ,@(when in-p `(:in ',in)) - ,@(when fixture-p `(:fixture ',fixture)))) + (make-suite ',name + ,@(when description `(:description ,description)) + ,@(when in-p `(:in ',in)) + ,@(when fixture-p `(:fixture ',fixture))) ',name)) (defmacro def-suite* (name &rest def-suite-args) @@ -50,6 +49,7 @@ Overrides any existing suite named NAME." (let ((suite (make-instance 'test-suite :name name :fixture fixture))) (when description (setf (description suite) description)) + (setf (gethash name *suites*) suite) (loop for i in (ensure-list parent-suite) for in-suite = (get-test i) do (progn -- 1.7.10.4