diff --git a/src/test/clojure/cljs/analyzer/spec_tests.clj b/src/test/clojure/cljs/analyzer/spec_tests.clj index ff8888ec5..b514d6a7d 100644 --- a/src/test/clojure/cljs/analyzer/spec_tests.clj +++ b/src/test/clojure/cljs/analyzer/spec_tests.clj @@ -16,8 +16,22 @@ (is (s/valid? ::a/node (analyze ns-env '(if true true)))) (is (s/valid? ::a/node (analyze ns-env '(if true true false))))) +(deftest test-do + (is (s/valid? ::a/node (analyze ns-env '(do)))) + (is (s/valid? ::a/node (analyze ns-env '(do 1)))) + (is (s/valid? ::a/node (analyze ns-env '(do 1 2 3))))) + +(deftest test-let + (is (s/valid? ::a/node (analyze ns-env '(let [])))) + ;(is (s/valid? ::a/node (analyze ns-env '(let [x 1])))) + ;(is (s/valid? ::a/node (analyze ns-env '(let [x 1] x)))) + ) + (comment (test/run-tests) + ;; binding is missing :form + (s/explain ::a/node (analyze ns-env '(let [x 1]))) + ) diff --git a/src/test/clojure/cljs/analyzer/specs.cljc b/src/test/clojure/cljs/analyzer/specs.cljc index 64b2e8835..a99818c3f 100644 --- a/src/test/clojure/cljs/analyzer/specs.cljc +++ b/src/test/clojure/cljs/analyzer/specs.cljc @@ -151,7 +151,7 @@ (s/keys :req-un [::t ::body]))) -(s/def ::statements ::node) +(s/def ::statements (s/* ::node)) (s/def ::ret ::node) (s/def ::body? boolean?)