1.2.0 permalink Arrow_down_16x16
  • (assert-any msg form)
Returns generic assertion code for any test, including macros, Java
method calls, or isolated symbols.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/test.clj:434 top

(defn assert-any
  "Returns generic assertion code for any test, including macros, Java
  method calls, or isolated symbols."
  {:added "1.1"}
  [msg form]
  `(let [value# ~form]
     (if value#
       (do-report {:type :pass, :message ~msg,
                :expected '~form, :actual value#})
       (do-report {:type :fail, :message ~msg,
                :expected '~form, :actual value#}))
     value#))
Vars in clojure.contrib.test-is/assert-any: defn apply concat hash-map let list seq vector
Used in 0 other vars

Comments top

No comments for assert-any. Log in to add a comment.