X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fmop.impure.lisp;h=c362778563bda5797d3376f738b2f020ed42f5aa;hb=0a15b6bbf9d5d3a64b5ac08bb96b6e5ec221d2ae;hp=d1b41721ba9d1aef3edeb5e803105c4542403edd;hpb=6e7800ef504e95cc5ce4d10d1e974ff09b2023ec;p=sbcl.git diff --git a/tests/mop.impure.lisp b/tests/mop.impure.lisp index d1b4172..c362778 100644 --- a/tests/mop.impure.lisp +++ b/tests/mop.impure.lisp @@ -513,4 +513,18 @@ (assert (subtypep class2 class1)) (assert (typep (make-instance class2) class1))) +;;; ensure-class got its treatment of :metaclass wrong. +(ensure-class 'better-be-standard-class :direct-superclasses '(standard-object) + :metaclass 'standard-class + :metaclass 'funcallable-standard-class) +(assert (eq (class-of (find-class 'better-be-standard-class)) + (find-class 'standard-class))) + +;;; CLASS-SLOTS should signal an error for classes that are not yet +;;; finalized. Reported by Levente Meszaros on sbcl-devel. +(defclass has-slots-but-isnt-finalized () (a b c)) +(let ((class (find-class 'has-slots-but-isnt-finalized))) + (assert (not (sb-mop:class-finalized-p class))) + (assert (raises-error? (sb-mop:class-slots class) sb-kernel::reference-condition))) + ;;;; success