0.6.11.40:
[sbcl.git] / tests / assertoid.lisp
index 4b1e9bf..c6dd931 100644 (file)
 
 (cl:in-package :cl-user)
 
+(defmacro grab-condition (&body body)
+  `(nth-value 1
+     (ignore-errors ,@body)))
+
+(defmacro raises-error? (&body body)
+  `(typep (nth-value 1 (ignore-errors ,@body)) 'error))
+
 ;;; EXPR is an expression to evaluate (both with EVAL and with
 ;;; COMPILE/FUNCALL). EXTRA-OPTIMIZATIONS is a list of lists of
 ;;; optimizations to pass to (DECLARE (OPTIMIZE ..)), to cause the