X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fmop.impure.lisp;h=d5116f999bca40a8a6d59e87d26a0acebbce8449;hb=8c81c0972f9e70f124b57394b5be29d9e661a0c7;hp=9f2e9e53062464fc1e2970d5b13a8b943f2ac058;hpb=53e87d8996712548798736a2b85f9fccf200e76a;p=sbcl.git diff --git a/tests/mop.impure.lisp b/tests/mop.impure.lisp index 9f2e9e5..d5116f9 100644 --- a/tests/mop.impure.lisp +++ b/tests/mop.impure.lisp @@ -146,5 +146,29 @@ (defvar *automethod-object* (make-instance 'automethod-object)) (assert (typep *automethod-object* 'automethod-object)) +;;; COMPUTE-EFFECTIVE-SLOT-DEFINITION should take three arguments, one +;;; of which is the name of the slot. +(defvar *compute-effective-slot-definition-count* 0) +(defmethod compute-effective-slot-definition :before + (class (name (eql 'foo)) dsds) + (incf *compute-effective-slot-definition-count*)) +(defclass cesd-test-class () + ((foo :initarg :foo))) +(make-instance 'cesd-test-class :foo 3) +;;; FIXME: this assertion seems a little weak. I don't know why +;;; COMPUTE-EFFECTIVE-SLOT-DEFINITION gets called twice in this +;;; sequence, nor whether that's compliant with AMOP. -- CSR, +;;; 2003-04-17 +(assert (> *compute-effective-slot-definition-count* 0)) + +;;; this used to cause a nasty uncaught metacircularity in PCL. +(defclass substandard-method (standard-method) ()) +(defgeneric substandard-defgeneric (x y) + (:method-class substandard-method) + (:method ((x number) (y number)) (+ x y)) + (:method ((x string) (y string)) (concatenate 'string x y))) +(assert (= (substandard-defgeneric 1 2) 3)) +(assert (string= (substandard-defgeneric "1" "2") "12")) + ;;;; success (sb-ext:quit :unix-status 104)