X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=d3a76aa166f4740897b92f7a59b497805720a07b;hb=4081f91910d6dc5dc79e2c43b8a746acaa78ecd9;hp=60815d0aee9da692d970def2ac65fe86c14066f1;hpb=c7638557b3c7b34267daba188d345f5d284f4ac3;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 60815d0..d3a76aa 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -277,6 +277,22 @@ (defmethod gf (obj) obj) +;;; Until sbcl-0.7.7.20, some conditions weren't being signalled, and +;;; some others were of the wrong type: +(macrolet ((assert-program-error (form) + `(multiple-value-bind (value error) + (ignore-errors ,form) + (assert (null value)) + (assert (typep error 'program-error))))) + (assert-program-error (defclass foo001 () (a b a))) + (assert-program-error (defclass foo002 () + (a b) + (:default-initargs x 'a x 'b))) + (assert-program-error (defclass foo003 () + ((a :allocation :class :allocation :class)))) + (assert-program-error (defclass foo004 () + ((a :silly t))))) + ;;;; success (sb-ext:quit :unix-status 104)