137 |
(deftest trace.12 |
(deftest trace.12 |
138 |
(progn |
(progn |
139 |
(untrace) |
(untrace) |
140 |
(defgeneric generic-function-to-trace (x y)) |
(eval '(defgeneric generic-function-to-trace (x y))) |
141 |
(trace generic-function-to-trace) |
(trace generic-function-to-trace) |
142 |
(prog1 (trace) (untrace))) |
(prog1 (trace) (untrace))) |
143 |
(generic-function-to-trace)) |
(generic-function-to-trace)) |
145 |
(deftest trace.13 |
(deftest trace.13 |
146 |
(progn |
(progn |
147 |
(untrace) |
(untrace) |
148 |
(defgeneric generic-function-to-trace (x y)) |
(eval '(defgeneric generic-function-to-trace (x y))) |
149 |
(trace generic-function-to-trace) |
(trace generic-function-to-trace) |
150 |
(defmethod generic-function-to-trace ((x t)(y t)) nil) |
(eval '(defmethod generic-function-to-trace ((x t)(y t)) nil)) |
151 |
(prog1 (trace) (untrace))) |
(prog1 (trace) (untrace))) |
152 |
(generic-function-to-trace)) |
(generic-function-to-trace)) |
153 |
|
|
154 |
(deftest trace.14 |
(deftest trace.14 |
155 |
(progn |
(progn |
156 |
(untrace) |
(untrace) |
157 |
(defgeneric generic-function-to-trace (x y)) |
(eval '(defgeneric generic-function-to-trace (x y))) |
158 |
(trace generic-function-to-trace) |
(trace generic-function-to-trace) |
159 |
(defmethod generic-function-to-trace ((x t)(y t)) nil) |
(eval '(defmethod generic-function-to-trace ((x t)(y t)) nil)) |
160 |
(assert (not (equal (with-output-to-string |
(assert (not (equal (with-output-to-string |
161 |
(*trace-output*) |
(*trace-output*) |
162 |
(assert (null (generic-function-to-trace 'a 'b)))) |
(assert (null (generic-function-to-trace 'a 'b)))) |
172 |
(deftest trace.15 |
(deftest trace.15 |
173 |
(progn |
(progn |
174 |
(untrace) |
(untrace) |
175 |
(let* ((gf (defgeneric generic-function-to-trace2 (x y))) |
(let* ((gf (eval '(defgeneric generic-function-to-trace2 (x y)))) |
176 |
(m (defmethod generic-function-to-trace2 ((x integer)(y integer)) |
(m (eval '(defmethod generic-function-to-trace2 |
177 |
:foo))) |
((x integer)(y integer)) |
178 |
(defmethod generic-function-to-trace2 ((x symbol)(y symbol)) :bar) |
:foo)))) |
179 |
|
(eval '(defmethod generic-function-to-trace2 |
180 |
|
((x symbol)(y symbol)) :bar)) |
181 |
(assert (eql (generic-function-to-trace2 1 2) :foo)) |
(assert (eql (generic-function-to-trace2 1 2) :foo)) |
182 |
(assert (eql (generic-function-to-trace2 'a 'b) :bar)) |
(assert (eql (generic-function-to-trace2 'a 'b) :bar)) |
183 |
(trace generic-function-to-trace2) |
(trace generic-function-to-trace2) |