X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fmop-3.impure-cload.lisp;h=cb6f609903d55af3c71743e3bfba9fe710c92861;hb=31f68584d0732dc0d17f379773e5f87f1e5a78ad;hp=173ba20db70ee4d4e13b12e31605b82e9ca3bea4;hpb=176fec4cc52018f811f343f339c79fbf58ab1838;p=sbcl.git diff --git a/tests/mop-3.impure-cload.lisp b/tests/mop-3.impure-cload.lisp index 173ba20..cb6f609 100644 --- a/tests/mop-3.impure-cload.lisp +++ b/tests/mop-3.impure-cload.lisp @@ -12,10 +12,7 @@ ;;;; more information. ;;; This file contains two tests for COMPUTE-APPLICABLE-METHODS on -;;; subclasses of generic functions. However, at present it is -;;; impossible to have both of these in the same image, because of a -;;; vicious metacircle. Once the vicious metacircle is dealt with, -;;; uncomment the second test case. +;;; subclasses of generic functions. ;;; tests from Bruno Haible (sbcl-devel 2004-08-02) @@ -32,7 +29,7 @@ (let ((result '())) (dolist (method methods) (if (and (consp result) - (equal (method-qualifiers method) + (equal (method-qualifiers method) (method-qualifiers (caar result)))) (push method (car result)) (push (list method) result))) @@ -40,25 +37,24 @@ (defmethod compute-applicable-methods ((gf msl-generic-function) arguments) (reverse-method-list (call-next-method))) -(defmethod compute-applicable-methods-using-classes +(defmethod compute-applicable-methods-using-classes ((gf msl-generic-function) classes) (reverse-method-list (call-next-method))) -(defgeneric testgf07 (x) +(defgeneric testgf07 (x) (:generic-function-class msl-generic-function) - (:method ((x integer)) + (:method ((x integer)) (cons 'integer (if (next-method-p) (call-next-method)))) - (:method ((x real)) + (:method ((x real)) (cons 'real (if (next-method-p) (call-next-method)))) - (:method ((x number)) + (:method ((x number)) (cons 'number (if (next-method-p) (call-next-method)))) - (:method :around ((x integer)) + (:method :around ((x integer)) (coerce (call-next-method) 'vector))) (assert (equalp (list (testgf07 5.0) (testgf07 17)) '((number real) #(number real integer)))) -#| (defclass nonumber-generic-function (standard-generic-function) () (:metaclass funcallable-standard-class)) @@ -69,26 +65,23 @@ (sb-pcl:method-specializers method))) methods)) -(defmethod compute-applicable-methods +(defmethod compute-applicable-methods ((gf nonumber-generic-function) arguments) (nonumber-method-list (call-next-method))) -(defmethod compute-applicable-methods-using-classes +(defmethod compute-applicable-methods-using-classes ((gf nonumber-generic-function) classes) (nonumber-method-list (call-next-method))) -(defgeneric testgf08 (x) +(defgeneric testgf08 (x) (:generic-function-class nonumber-generic-function) - (:method ((x integer)) + (:method ((x integer)) (cons 'integer (if (next-method-p) (call-next-method)))) - (:method ((x real)) + (:method ((x real)) (cons 'real (if (next-method-p) (call-next-method)))) - (:method ((x number)) + (:method ((x number)) (cons 'number (if (next-method-p) (call-next-method)))) - (:method :around ((x integer)) + (:method :around ((x integer)) (coerce (call-next-method) 'vector))) (assert (equalp (list (testgf08 5.0) (testgf08 17)) '((real) #(integer real)))) -|# - -(sb-ext:quit :unix-status 104)