X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fassertoid.lisp;h=c6dd931b4aa013840236e979603965562cab34bb;hb=a18f0a95bc9a457e4d2d00c702b746f29c2662b1;hp=4b1e9bf477ffcdb24e54a3137920459cad5564b9;hpb=675c5a9f9e3028bc2fd922ed6f570f01cf8c41cf;p=sbcl.git diff --git a/tests/assertoid.lisp b/tests/assertoid.lisp index 4b1e9bf..c6dd931 100644 --- a/tests/assertoid.lisp +++ b/tests/assertoid.lisp @@ -14,6 +14,13 @@ (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