From: Marco Baringer Date: Tue, 26 Jun 2007 11:49:00 +0000 (+0200) Subject: Don't put a literal suite object into a test form's macro expnsion. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=5c649363640c2060387ed91132791e52e2c52c11;p=fiveam.git Don't put a literal suite object into a test form's macro expnsion. Use either *SUITE* or (GET-TEST NAME) --- diff --git a/src/test.lisp b/src/test.lisp index 9190003..29e8361 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -50,9 +50,9 @@ FIXTURE specifies a fixtrue to wrap the body in. If PROFILE is T profiling information will be collected as well." (let* ((tmp (gensym)) (suite-arg (getf (cdr (ensure-list name)) :suite tmp)) - (suite (cond - ((eq tmp suite-arg) *suite*) - (t (get-test suite-arg))))) + (suite-form (cond + ((eq tmp suite-arg) '*suite*) + (t `(get-test ',suite-arg))))) (when (consp name) (remf (cdr name) :suite)) (destructuring-bind (name &key depends-on (compile-at :run-time) fixture profile) @@ -81,7 +81,7 @@ If PROFILE is T profiling information will be collected as well." :description ,description :depends-on ',depends-on :collect-profiling-info ,profile)) - (setf (gethash ',name (tests (get-test ',(name suite)))) ',name) + (setf (gethash ',name (tests ,suite-form)) ',name) (when *run-test-when-defined* (run! ',name)) ',name)))))