X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=73a68bbc172997ff11cd10871ad472ab92d664a2;hb=3a8bfcb01abe4d8eeb9ef1343d623dbbf57c19d9;hp=41b20492243771bfa4b5ee2beb5b0729a72c4f35;hpb=619ee68faffc3990c5108611762ef54bf8cbbd1e;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 41b2049..73a68bb 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -553,5 +553,23 @@ (bug234-b) (assert (= *bug234-b* 1)) +;;; we should be able to make classes with uninterned names: +(defclass #:class-with-uninterned-name () ()) + +;;; SLOT-MISSING should be called when there are missing slots. +(defclass class-with-all-slots-missing () ()) +(defmethod slot-missing (class (o class-with-all-slots-missing) + slot-name op + &optional new-value) + op) +(assert (eq (slot-value (make-instance 'class-with-all-slots-missing) 'foo) + 'slot-value)) +(assert (eq (funcall (lambda (x) (slot-value x 'bar)) + (make-instance 'class-with-all-slots-missing)) + 'slot-value)) +(assert (eq (funcall (lambda (x) (setf (slot-value x 'baz) 'baz)) + (make-instance 'class-with-all-slots-missing)) + 'setf)) + ;;;; success (sb-ext:quit :unix-status 104)