Fix (signals error ...), was always passing
authorDonavon Keithley <keithley@easystreet.com>
Wed, 15 Feb 2006 20:11:41 +0000 (21:11 +0100)
committerDonavon Keithley <keithley@easystreet.com>
Wed, 15 Feb 2006 20:11:41 +0000 (21:11 +0100)
If the body of the check didn't signal error, PROCESS-FAILURE would. So I
simply moved PROCESS-FAILURE out of the HANDLER-BIND form.

src/check.lisp

index 06c9bba..e91b46d 100644 (file)
@@ -207,13 +207,13 @@ not evaluated."
                                                   :test-expr ',condition)
                                       (return-from ,block-name t))))
            (block nil
-             ,@body
-             (process-failure
-              :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)))))))
+             ,@body))
+         (process-failure
+          :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)))))
 
 (defmacro finishes (&body body)
   "Generates a pass if BODY executes to normal completion. In