/[gcl]/gcl/ansi-tests/compute-applicable-methods.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/compute-applicable-methods.lsp

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

revision 1.2 by pfdietz, Wed Jun 4 03:09:56 2003 UTC revision 1.3 by pfdietz, Sat Jul 12 13:46:01 2003 UTC
# Line 49  Line 49 
49    (compute-applicable-methods #'cam-gf-02 '(1))    (compute-applicable-methods #'cam-gf-02 '(1))
50    nil)    nil)
51    
52  (defgeneric cam-gf-03 (x)  (eval-when (:load-toplevel :compile-toplevel :execute)
53    (:method-combination + :most-specific-first))    (report-and-ignore-errors
54       (defgeneric cam-gf-03 (x)
55  (defparameter *cam-gf-03-method1*       (:method-combination + :most-specific-first))
56    (defmethod cam-gf-03 + ((x integer)) 1))    
57       (defparameter *cam-gf-03-method1*
58  (defparameter *cam-gf-03-method2*       (defmethod cam-gf-03 + ((x integer)) 1))
59    (defmethod cam-gf-03 + ((x rational)) 2))    
60       (defparameter *cam-gf-03-method2*
61  (defparameter *cam-gf-03-method3*       (defmethod cam-gf-03 + ((x rational)) 2))
62    (defmethod cam-gf-03 + ((x real)) 4))    
63       (defparameter *cam-gf-03-method3*
64  (defparameter *cam-gf-03-method4*       (defmethod cam-gf-03 + ((x real)) 4))
65    (defmethod cam-gf-03 + ((x number)) 8))    
66       (defparameter *cam-gf-03-method4*
67  (defparameter *cam-gf-03-method5*       (defmethod cam-gf-03 + ((x number)) 8))
68    (defmethod cam-gf-03 + ((x t)) 16))    
69       (defparameter *cam-gf-03-method5*
70         (defmethod cam-gf-03 + ((x t)) 16))))
71    
72  (deftest compute-applicable-methods.6  (deftest compute-applicable-methods.6
73    (equalt (compute-applicable-methods #'cam-gf-03 (list 0))    (equalt (compute-applicable-methods #'cam-gf-03 (list 0))
# Line 73  Line 75 
75                  *cam-gf-03-method4* *cam-gf-03-method5*))                  *cam-gf-03-method4* *cam-gf-03-method5*))
76    t)    t)
77    
78  (defgeneric cam-gf-04 (x)  (eval-when (:load-toplevel :compile-toplevel :execute)
79    (:method-combination + :most-specific-last))    (report-and-ignore-errors
80       (defgeneric cam-gf-04 (x)
81  (defparameter *cam-gf-04-method1*       (:method-combination + :most-specific-last))
82    (defmethod cam-gf-04 + ((x integer)) 1))    
83       (defparameter *cam-gf-04-method1*
84  (defparameter *cam-gf-04-method2*       (defmethod cam-gf-04 + ((x integer)) 1))
85    (defmethod cam-gf-04 + ((x rational)) 2))    
86       (defparameter *cam-gf-04-method2*
87  (defparameter *cam-gf-04-method3*       (defmethod cam-gf-04 + ((x rational)) 2))
88    (defmethod cam-gf-04 + ((x real)) 4))    
89       (defparameter *cam-gf-04-method3*
90  (defparameter *cam-gf-04-method4*       (defmethod cam-gf-04 + ((x real)) 4))
91    (defmethod cam-gf-04 + ((x number)) 8))    
92       (defparameter *cam-gf-04-method4*
93  (defparameter *cam-gf-04-method5*       (defmethod cam-gf-04 + ((x number)) 8))
94    (defmethod cam-gf-04 + ((x t)) 16))    
95       (defparameter *cam-gf-04-method5*
96         (defmethod cam-gf-04 + ((x t)) 16))
97       ))
98          
99  (deftest compute-applicable-methods.7  (deftest compute-applicable-methods.7
100    (equalt (compute-applicable-methods #'cam-gf-04 (list 0))    (equalt (compute-applicable-methods #'cam-gf-04 (list 0))
101            (list *cam-gf-04-method1* *cam-gf-04-method2* *cam-gf-04-method3*            (list *cam-gf-04-method1* *cam-gf-04-method2* *cam-gf-04-method3*

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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