/[gcl]/gcl/ansi-tests/defgeneric.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/defgeneric.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by pfdietz, Sat May 24 18:56:32 2003 UTC revision 1.14 by pfdietz, Sun May 25 12:40:44 2003 UTC
# Line 751  Line 751 
751      (defgeneric.fun.31 'a 'b))      (defgeneric.fun.31 'a 'b))
752    (a b))    (a b))
753    
754    (deftest defgeneric.32
755      (progn
756        (defgeneric defgeneric.fun.32 (x) (:method ((x symbol)) :bad))
757        (defgeneric defgeneric.fun.32 (x) (:method ((x t)) :good))
758        (defgeneric.fun.32 'x))
759      :good)
760    
761    (deftest defgeneric.33
762      (let ((fn
763             (eval
764              '(defgeneric (setf defgeneric.fun.33) (x y &rest args)
765                 (:method (x (y cons) &rest args)
766                          (assert (null args)) (setf (car y) x))
767                 (:method (x (y array) &rest args)
768                          (setf (apply #'aref y args) x))))))
769        (values
770         (let ((z (list 'a 'b)))
771           (list
772            (setf (defgeneric.fun.33 z) 'c)
773            z))
774         (let ((a (make-array '(10) :initial-element nil)))
775           (list
776            (setf (defgeneric.fun.33 a 5) 'd)
777            a))))
778      (c (c b))
779      (d #(nil nil nil nil nil d nil nil nil nil)))
780    
781    (deftest defgeneric.34
782      (let ((fn (eval '(defgeneric #:defgeneric.fun.34 (x)
783                         (:method ((x t)) (list x :good))))))
784        (funcall fn 10))
785      (10 :good))
786    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26