(defmacro assert-equal (actual expected &key (test '#'equal))
`(unless (funcall ,test ,actual ,expected)
- (warn "The value ~S is not equal to the expected value ~S"
- ',actual ',expected)))
+ (warn "The value of ~S (~S) is not equal to the expected value ~S"
+ ',actual ,actual ,expected)))
(defmacro assert-true (form)
`(unless ,form
- (warn "The value ~S does not evaluate to 'true'"
- ',form)))
+ (warn "The value of ~S (~S) does not evaluate to 'true'"
+ ',form ,form)))
(defmacro assert-false (form)
`(when ,form
- (warn "The value ~S does not evaluate to 'false'"
- ',form)))
+ (warn "The value ~S (~S) does not evaluate to 'false'"
+ ',form ,form)))
(defmacro assert-error (condition &body body)
"Checks if BODY signals a condition of class CONDITION. If it does not, a failure is