projects
/
fiveam.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add an (eval-when ...) when defining a test suite
[fiveam.git]
/
src
/
test.lisp
diff --git
a/src/test.lisp
b/src/test.lisp
index
9190003
..
aacb11e
100644
(file)
--- a/
src/test.lisp
+++ b/
src/test.lisp
@@
-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))
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)
(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)
(declare (type (member :run-time :definition-time) compile-at))
(let ((description (if (stringp (car body))
(pop body)
@@
-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))
: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)))))
(when *run-test-when-defined*
(run! ',name))
',name)))))