:test-expr ',condition)
(add-result 'test-passed :test-expr ',condition)))
-(defmacro signals (condition &body body)
+(defmacro signals ((condition &optional reason-control reason-args)
+ &body body)
"Generates a pass if BODY signals a condition of type
CONDITION. BODY is evaluated in a block named NIL, CONDITION is
not evaluated."
(block nil
,@body
(process-failure
- :reason (format nil "Failed to signal a ~S" ',condition)
+ :reason ,(if reason-control
+ `(format nil ,reason-control ,@reason-args)
+ `(format nil "Failed to signal a ~S" ',condition))
:test-expr ',condition)
(return-from ,block-name nil))))))