Don't inline package object in ECL (breaks compilation).
[fiveam.git] / src / test.lisp
index 9190003..7de4941 100644 (file)
@@ -50,13 +50,13 @@ 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)
-        (append (ensure-list name) (default-test-args suite))
+        (ensure-list name)
       (declare (type (member :run-time :definition-time) compile-at))
       (let ((description (if (stringp (car body))
                              (pop body)
@@ -69,7 +69,9 @@ If PROFILE is T profiling information will be collected as well."
         `(progn
            (setf (get-test ',name) (make-instance 'test-case
                                                   :name ',name
-                                                  :runtime-package ,*package*
+                                                  :runtime-package
+                                                  #-ecl ,*package*
+                                                  #+ecl (find-package ,(package-name *package*))
                                                   :test-lambda
                                                   (lambda ()
                                                     ,@ (ecase compile-at
@@ -81,7 +83,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)))))