Permalink
Browse files

Tweaked macro %IN-SUITE

  • Loading branch information...
1 parent ee25414 commit c30abb67464e581a76ce8c5545ff9aff59747f09 @adlai committed Sep 1, 2009
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/suite.lisp
View
@@ -56,14 +56,13 @@ See also: DEF-SUITE *SUITE*"
`(%in-suite ,suite-name :in ,in :fail-on-error nil))
(defmacro %in-suite (suite-name &key (fail-on-error t) in)
- (with-unique-names (suite)
- `(progn
- (if-bind ,suite (get-test ',suite-name)
- (setf *suite* ,suite)
- (progn
- (when ,fail-on-error
- (cerror "Create a new suite named ~A."
- "Unkown suite ~A." ',suite-name))
- (setf (get-test ',suite-name) (make-suite ',suite-name :in ',in)
- *suite* (get-test ',suite-name))))
- ',suite-name)))
+ `(progn
+ (aif (get-test ',suite-name)
+ (setf *suite* it)
+ (progn
+ (when ,fail-on-error
+ (cerror "Create a new suite named ~A."
+ "Unkown suite ~A." ',suite-name))
+ (setf (get-test ',suite-name) (make-suite ',suite-name :in ',in)
+ *suite* (get-test ',suite-name))))
+ ',suite-name))

0 comments on commit c30abb6

Please sign in to comment.