|
@@ -190,6 +190,7 @@ assertion.")
|
190
|
190
|
|
191
|
191
|
(defmethod print-failure :around (type form expected actual extras)
|
192
|
192
|
"Failure header and footer output."
|
|
193
|
+ (declare (ignore expected actual))
|
193
|
194
|
(format t "~& | Failed Form: ~S" form)
|
194
|
195
|
(call-next-method)
|
195
|
196
|
(when extras
|
|
@@ -198,22 +199,26 @@ assertion.")
|
198
|
199
|
type)
|
199
|
200
|
|
200
|
201
|
(defmethod print-failure (type form expected actual extras)
|
|
202
|
+ (declare (ignore type form extras))
|
201
|
203
|
(format t "~& | Expected ~{~S~^; ~} " expected)
|
202
|
204
|
(format t "~<~% | ~:;but saw ~{~S~^; ~}~>" actual))
|
203
|
205
|
|
204
|
206
|
(defmethod print-failure ((type (eql :error))
|
205
|
207
|
form expected actual extras)
|
|
208
|
+ (declare (ignore form extras))
|
206
|
209
|
(format t "~& | ~@[Should have signalled ~{~S~^; ~} but saw~]"
|
207
|
210
|
expected)
|
208
|
211
|
(format t " ~{~S~^; ~}" actual))
|
209
|
212
|
|
210
|
213
|
(defmethod print-failure ((type (eql :macro))
|
211
|
214
|
form expected actual extras)
|
|
215
|
+ (declare (ignore form extras))
|
212
|
216
|
(format t "~& | Should have expanded to ~{~S~^; ~} " expected)
|
213
|
217
|
(format t "~<~%~:;but saw ~{~S~^; ~}~>" actual))
|
214
|
218
|
|
215
|
219
|
(defmethod print-failure ((type (eql :output))
|
216
|
220
|
form expected actual extras)
|
|
221
|
+ (declare (ignore form extras))
|
217
|
222
|
(format t "~& | Should have printed ~{~S~^; ~} " expected)
|
218
|
223
|
(format t "~<~%~:;but saw ~{~S~^; ~}~>" actual))
|
219
|
224
|
|
|
@@ -474,6 +479,7 @@ assertion.")
|
474
|
479
|
|
475
|
480
|
(defmethod test-passed-p ((type (eql :error)) expected actual test)
|
476
|
481
|
"Return the result of the error assertion."
|
|
482
|
+ (declare (ignore test))
|
477
|
483
|
(or
|
478
|
484
|
(eql (car actual) (car expected))
|
479
|
485
|
(typep (car actual) (car expected))))
|
|
@@ -486,10 +492,12 @@ assertion.")
|
486
|
492
|
|
487
|
493
|
(defmethod test-passed-p ((type (eql :macro)) expected actual test)
|
488
|
494
|
"Return the result of the macro expansion."
|
|
495
|
+ (declare (ignore test))
|
489
|
496
|
(equal (car actual) (car expected)))
|
490
|
497
|
|
491
|
498
|
(defmethod test-passed-p ((type (eql :output)) expected actual test)
|
492
|
499
|
"Return the result of the printed output."
|
|
500
|
+ (declare (ignore test))
|
493
|
501
|
(string=
|
494
|
502
|
(string-trim '(#\newline #\return #\space) (car actual))
|
495
|
503
|
(car expected)))
|
|
@@ -501,6 +509,7 @@ assertion.")
|
501
|
509
|
|
502
|
510
|
(defmethod test-passed-p ((type (eql :result)) expected actual test)
|
503
|
511
|
"Return the result of the assertion."
|
|
512
|
+ (declare (ignore test))
|
504
|
513
|
(logically-equal (car actual) (car expected)))
|
505
|
514
|
|
506
|
515
|
(defun form-contains-one-of-p (form symbol-list)
|