Macro: IS-TRUE

Documentation

Like IS this check generates a pass if CONDITION returns true and a failure if CONDITION returns false. Unlike IS this check does not inspect CONDITION to determine how to report the failure.

Source

(defmacro is-true (condition &rest reason-args)
  "Like IS this check generates a pass if CONDITION returns true
  and a failure if CONDITION returns false. Unlike IS this check
  does not inspect CONDITION to determine how to report the
  failure."
  `(if ,condition
    (add-result 'test-passed :test-expr ',condition)
    (process-failure
     :reason ,(if reason-args
                  `(format nil ,@reason-args)
                  `(format nil "~S did not return a true value" ',condition))
     :test-expr ',condition)))
Source Context