Fix 14 wave-4 re-review findings (batches w4a+w4b)

This commit is contained in:
venomade committed 2026-11-22 12:23:01 +00:00
1 parent a28a35991f
commit fd5e11cdeb
23 files changed
+98 -29

No files matched your search

+12 -1
View File
@@ -11,6 +11,11 @@
(defgeneric purr (a))
(defmethod purr ((a animal))
"prrr-from-animal")
(defgeneric hiss (a))
(defmethod announce ((d dog))
(concatenate 'string (call-next-method) " Woof!"))
@@ -19,6 +24,11 @@
(call-next-method)
"Prrr"))
(defmethod hiss ((c cat))
(if (next-method-p)
(call-next-method)
"Prrr"))
;;; ------------------------------------------------------------------
;;; Checks. Read them - they tell you what to aim for - but leave
;;; them unchanged.
@@ -26,4 +36,5 @@
(check-equal "I am an animal. Woof!" (announce (make-instance 'dog)))
(check-equal "I am an animal." (announce (make-instance 'animal)))
(check-equal "Prrr" (purr (make-instance 'cat)))
(check-equal "prrr-from-animal" (purr (make-instance 'cat)))
(check-equal "Prrr" (hiss (make-instance 'cat)))