X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fmop.impure.lisp;h=6735c818c058c7c8d841a421849b1af5ceb93ab1;hb=f0bc5a240267a97d7b65db24d7ed6914dd42f036;hp=84a7e323de1df03c8ece2580f32cfa23b84fb51f;hpb=3aaed55326303bb377c4821c5e83b2e4e9c538fc;p=sbcl.git diff --git a/tests/mop.impure.lisp b/tests/mop.impure.lisp index 84a7e32..6735c81 100644 --- a/tests/mop.impure.lisp +++ b/tests/mop.impure.lisp @@ -22,6 +22,13 @@ (in-package "MOP-TEST") +;;; Readers for Class Metaobjects (pp. 212--214 of AMOP) +(defclass red-herring (forward-ref) ()) + +(assert (null (sb-pcl:class-direct-slots (sb-pcl:find-class 'forward-ref)))) +(assert (null (sb-pcl:class-direct-default-initargs + (sb-pcl:find-class 'forward-ref)))) + ;;; Readers for Generic Function Metaobjects (pp. 216--218 of AMOP) (defgeneric fn-with-odd-arg-precedence (a b c) (:argument-precedence-order b c a)) @@ -80,5 +87,13 @@ (make-instance 'finalization-test-2) (assert (= (get-count) 3)) +;;; Bits of FUNCALLABLE-STANDARD-CLASS are easy to break; make sure +;;; that it is at least possible to define classes with that as a +;;; metaclass. +(defclass gf-class (standard-generic-function) () + (:metaclass sb-pcl::funcallable-standard-class)) +(defgeneric g (a b c) + (:generic-function-class gf-class)) + ;;;; success (sb-ext:quit :unix-status 104)