66 |
(defgeneric dmc-gf-03 (x) (:method-combination times)) |
(defgeneric dmc-gf-03 (x) (:method-combination times)) |
67 |
|
|
68 |
(deftest define-method-combination-03.1 |
(deftest define-method-combination-03.1 |
69 |
(handler-case |
(prog1 |
70 |
(progn |
(handler-case |
71 |
(eval '(defmethod dmc-gf-03 ((x integer)) t)) |
(progn |
72 |
:bad) |
(eval '(defmethod dmc-gf-03 ((x integer)) t)) |
73 |
(error () |
(eval '(dmc-gf-03 1)) |
74 |
(dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 1))) |
:bad) |
75 |
(remove-method #'dmc-gf-03 meth)) |
(error () :good)) |
76 |
:good)) |
(dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 1))) |
77 |
|
(remove-method #'dmc-gf-03 meth))) |
78 |
:good) |
:good) |
79 |
|
|
80 |
(deftest define-method-combination-03.2 |
(deftest define-method-combination-03.2 |
81 |
(handler-case |
(prog1 |
82 |
(progn |
(handler-case |
83 |
(eval '(defmethod dmc-gf-03 :before ((x cons)) t)) |
(progn |
84 |
:bad) |
(eval '(defmethod dmc-gf-03 :before ((x cons)) t)) |
85 |
(error () |
(eval '(dmc-gf-03 (cons 'a 'b))) |
86 |
(dolist (meth (compute-applicable-methods #'dmc-gf-03 (list '(a)))) |
:bad) |
87 |
(remove-method #'dmc-gf-03 meth)) |
(error () :good)) |
88 |
:good)) |
(dolist (meth (compute-applicable-methods #'dmc-gf-03 (list '(a)))) |
89 |
|
(remove-method #'dmc-gf-03 meth))) |
90 |
:good) |
:good) |
91 |
|
|
92 |
(deftest define-method-combination-03.3 |
(deftest define-method-combination-03.3 |
93 |
(handler-case |
(prog1 |
94 |
(progn |
(handler-case |
95 |
(eval '(defmethod dmc-gf-03 :after ((x symbol)) t)) |
(progn |
96 |
:bad) |
(eval '(defmethod dmc-gf-03 :after ((x symbol)) t)) |
97 |
(error () |
(eval '(dmc-gf-03 'a)) |
98 |
(dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 'a))) |
:bad) |
99 |
(remove-method #'dmc-gf-03 meth)) |
(error () :good)) |
100 |
:good)) |
(dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 'a))) |
101 |
|
(remove-method #'dmc-gf-03 meth))) |
102 |
:good) |
:good) |
103 |
|
|
104 |
(define-method-combination times2 |
(define-method-combination times2 |