我是 Clojure 的新手,在运行单元测试时遇到了一些麻烦。
(ns com.bluepojo.scratch
(:require clojure.test))
(defn add-one
([x] (+ x 1))
)
(is (= (add-one 3) 4))
给出:
java.lang.Exception: Unable to resolve symbol: is in this context
我错过了什么?
更新:
这有效:
(clojure.test/is (= (add-one 3) 4))
我如何做到这一点,这样我就不必在 is 之前声明 clojure.test 了?