clojure-koans/koans/about-asserts.clj
2010-01-31 10:52:32 -06:00

18 lines
490 B
Clojure

(def __ nil)
(defn #^{:zen "We shall contemplate truth by testing reality, via asserts."}
test-truth
[]
(assert false)) ;; This should be true
(defn #^{:zen "To understand reality, we must compare our expectations against reality."}
test-assert-equality
[]
(let [expected-value 0
actual-value (+ 1 1)]
(assert (= expected-value actual-value))))
(defn #^{:zen "Sometimes we will ask you to fill in the values"}
test-fill-in-values
[]
(assert (= __ (+ 1 1))))