15 |
(defparameter *find-method-gf-01-method4* |
(defparameter *find-method-gf-01-method4* |
16 |
(defmethod find-method-gf-01 ((x t)) 'd)) |
(defmethod find-method-gf-01 ((x t)) 'd)) |
17 |
|
|
|
(deftest find-method.1 |
|
|
(eqt (find-method #'find-method-gf-01 nil (list 'integer)) |
|
|
*find-method-gf-01-method1*) |
|
|
t) |
|
|
|
|
18 |
(deftest find-method.2 |
(deftest find-method.2 |
19 |
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'integer))) |
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'integer))) |
20 |
*find-method-gf-01-method1*) |
*find-method-gf-01-method1*) |
21 |
t) |
t) |
22 |
|
|
|
(deftest find-method.3 |
|
|
(eqt (find-method #'find-method-gf-01 nil (list 'rational)) |
|
|
*find-method-gf-01-method2*) |
|
|
t) |
|
|
|
|
23 |
(deftest find-method.4 |
(deftest find-method.4 |
24 |
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'rational))) |
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'rational))) |
25 |
*find-method-gf-01-method2*) |
*find-method-gf-01-method2*) |
26 |
t) |
t) |
27 |
|
|
|
(deftest find-method.5 |
|
|
(eqt (find-method #'find-method-gf-01 nil (list 'real)) |
|
|
*find-method-gf-01-method3*) |
|
|
t) |
|
|
|
|
28 |
(deftest find-method.6 |
(deftest find-method.6 |
29 |
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'real))) |
(eqt (find-method #'find-method-gf-01 nil (list (find-class 'real))) |
30 |
*find-method-gf-01-method3*) |
*find-method-gf-01-method3*) |
31 |
t) |
t) |
32 |
|
|
|
(deftest find-method.7 |
|
|
(eqt (find-method #'find-method-gf-01 nil (list t)) |
|
|
*find-method-gf-01-method4*) |
|
|
t) |
|
|
|
|
33 |
(deftest find-method.8 |
(deftest find-method.8 |
34 |
(eqt (find-method #'find-method-gf-01 nil (list (find-class t))) |
(eqt (find-method #'find-method-gf-01 nil (list (find-class t))) |
35 |
*find-method-gf-01-method4*) |
*find-method-gf-01-method4*) |
36 |
t) |
t) |
37 |
|
|
38 |
(deftest find-method.9 |
(deftest find-method.9 |
39 |
(find-method #'find-method-gf-01 (list :around) (list t) nil) |
(find-method #'find-method-gf-01 (list :around) (list (find-class t)) |
40 |
|
nil) |
41 |
nil) |
nil) |
42 |
|
|
43 |
(deftest find-method.10 |
(deftest find-method.10 |
44 |
(find-method #'find-method-gf-01 (list :after) (list 'integer) nil) |
(find-method #'find-method-gf-01 (list :after) |
45 |
|
(list (find-class 'integer)) nil) |
46 |
nil) |
nil) |
47 |
|
|
48 |
(deftest find-method.11 |
(deftest find-method.11 |
49 |
(find-method #'find-method-gf-01 (list :before) (list 'real) nil) |
(find-method #'find-method-gf-01 (list :before) (list (find-class 'real)) |
50 |
|
nil) |
51 |
nil) |
nil) |
52 |
|
|
53 |
(deftest find-method.error.1 |
(deftest find-method.error.1 |
64 |
|
|
65 |
(deftest find-method.error.4 |
(deftest find-method.error.4 |
66 |
(classify-error |
(classify-error |
67 |
(find-method #'find-method-gf-01 nil (list 'integer) nil nil)) |
(find-method #'find-method-gf-01 nil (list (find-class 'integer)) nil nil)) |
68 |
program-error) |
program-error) |
69 |
|
|
70 |
(deftest find-method.error.5 |
(deftest find-method.error.5 |
71 |
(handler-case |
(handler-case |
72 |
(find-method #'find-method-gf-01 nil (list 'symbol)) |
(find-method #'find-method-gf-01 nil (list (find-class 'symbol))) |
73 |
(error () :error)) |
(error () :error)) |
74 |
:error) |
:error) |
75 |
|
|
76 |
(deftest find-method.error.6 |
(deftest find-method.error.6 |
77 |
(handler-case |
(handler-case |
78 |
(find-method #'find-method-gf-01 nil (list 'symbol) 'x) |
(find-method #'find-method-gf-01 nil (list (find-class 'symbol)) 'x) |
79 |
(error () :error)) |
(error () :error)) |
80 |
:error) |
:error) |
81 |
|
|
87 |
|
|
88 |
(deftest find-method.error.8 |
(deftest find-method.error.8 |
89 |
(handler-case |
(handler-case |
90 |
(find-method #'find-method-gf-01 nil (list 'integer t)) |
(find-method #'find-method-gf-01 nil (list (find-class 'integer) |
91 |
|
(find-class t))) |
92 |
(error () :error)) |
(error () :error)) |
93 |
:error) |
:error) |
94 |
|
|
100 |
|
|
101 |
(deftest find-method.error.10 |
(deftest find-method.error.10 |
102 |
(handler-case |
(handler-case |
103 |
(find-method #'find-method-gf-01 nil (list 'integer t) nil) |
(find-method #'find-method-gf-01 nil (list (find-class 'integer) |
104 |
|
(find-class t)) |
105 |
|
nil) |
106 |
(error () :error)) |
(error () :error)) |
107 |
:error) |
:error) |
108 |
|
|