/[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.16 by pfdietz, Thu May 29 02:41:20 2003 UTC revision 1.17 by pfdietz, Thu May 29 12:28:08 2003 UTC
# Line 236  Line 236 
236             (and (stringp doc) (string=t doc "boo!"))))             (and (stringp doc) (string=t doc "boo!"))))
237       (let ((doc (documentation fn 'function)))       (let ((doc (documentation fn 'function)))
238         (or (not doc)         (or (not doc)
239             (and (stringp doc) (string=t doc "boo!"))))))             (and (stringp doc) (string=t doc "boo!"))))
240         (setf (documentation fn t) "foo")
241         (let ((doc (documentation fn t)))
242           (or (not doc)
243               (and (stringp doc) (string=t doc "foo"))))
244         (setf (documentation fn 'function) "bar")
245         (let ((doc (documentation fn t)))
246           (or (not doc)
247               (and (stringp doc) (string=t doc "bar"))))))
248            
249    t t #(a b c) #(d e f) t t)    t t #(a b c) #(d e f) t t "foo" t "bar" t)
250    
251  (deftest defgeneric.3  (deftest defgeneric.3
252    (let ((fn (eval '(defgeneric defgeneric.fun.3 (x y)    (let ((fn (eval '(defgeneric defgeneric.fun.3 (x y)
# Line 787  Line 795 
795      (funcall fn 10))      (funcall fn 10))
796    (10 :good))    (10 :good))
797    
798    (deftest defgeneric.35
799      (let ((fn (eval '(defgeneric defgeneric.fun.35 (x)
800                         (:method ((x (eql 'a)))
801                                  (declare (optimize (speed 0)))
802                                  "FOO"
803                                  (declare (optimize (safety 3)))
804                                  x)))))
805        (values
806         (funcall fn 'a)
807         (let ((method (first (compute-applicable-methods fn '(a)))))
808           (and method
809                (let ((doc (documentation method t)))
810                  (list
811                   (or (null doc) (equalt doc "FOO"))
812                   (setf (documentation method t) "BAR")
813                   (let ((doc (documentation method t)))
814                     (or (null doc) (equalt doc "BAR")))
815                   ))))))
816      a (t "BAR" t))

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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