projects
/
fiveam.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
def-suite should expand into an (eval-when (:always) ...) not a progn
[fiveam.git]
/
src
/
suite.lisp
diff --git
a/src/suite.lisp
b/src/suite.lisp
index
e7aab24
..
14427c6
100644
(file)
--- a/
src/suite.lisp
+++ b/
src/suite.lisp
@@
-23,12
+23,17
@@
IN (a symbol), if provided, causes this suite te be nested in the
suite named by IN. NB: This macro is built on top of make-suite,
as such it, like make-suite, will overrwrite any existing suite
named NAME."
suite named by IN. NB: This macro is built on top of make-suite,
as such it, like make-suite, will overrwrite any existing suite
named NAME."
- `(progn
+ `(eval-when (:compile-toplevel :load-toplevel :execute)
(make-suite ',name
(make-suite ',name
- ,@(when description `(:description ,description))
- ,@(when in `(:in ',in)))
+ ,@(when description `(:description ,description))
+ ,@(when in `(:in ',in)))
',name))
',name))
+(defmacro def-suite* (name &rest def-suite-args)
+ `(progn
+ (def-suite ,name ,@def-suite-args)
+ (in-suite ,name)))
+
(defun make-suite (name &key description in)
"Create a new test suite object.
(defun make-suite (name &key description in)
"Create a new test suite object.
@@
-59,7
+64,8
@@
after the execution of this form are, unless specified otherwise,
in the test-suite named SUITE-NAME.
See also: DEF-SUITE *SUITE*"
in the test-suite named SUITE-NAME.
See also: DEF-SUITE *SUITE*"
- `(%in-suite ,suite-name))
+ `(eval-when (:compile-toplevel :load-toplevel :execute)
+ (%in-suite ,suite-name)))
(defmacro in-suite* (suite-name &key in)
"Just like in-suite, but silently creates missing suites."
(defmacro in-suite* (suite-name &key in)
"Just like in-suite, but silently creates missing suites."