This commit is contained in:
1 parent
aa63cf2eec
commit
67343015b1
3 files changed
+170
-5
No files matched your search
+25
-2
@@ -1,6 +1,8 @@
|
||||
(ns expand-test
|
||||
(:require [expand :as sut]
|
||||
[clojure.test :as t]))
|
||||
[clojure.test :as t]
|
||||
[clojure.spec.alpha :as s]
|
||||
[scm]))
|
||||
|
||||
(t/deftest nearest-test
|
||||
(t/is (= '#{#{a b}}
|
||||
@@ -30,4 +32,25 @@
|
||||
'{[:lexical x A] [:var]
|
||||
[:lexical x B] [:primitive lambda]}
|
||||
'{[x #{a b}] [:lexical x A]
|
||||
[x #{a}] [:lexical x B]}))))
|
||||
[
|
||||
|
||||
;;; specsx #{a}
|
||||
] [:lexical x B]}))))
|
||||
|
||||
|
||||
;;; specs
|
||||
|
||||
(t/deftest spec-lambda-formals-test
|
||||
(t/are [x] (s/valid? ::sut/lambda-formals x)
|
||||
#scm/stx ()
|
||||
#scm/stx (#scm/stx a #scm/stx b)
|
||||
#scm/stx xs
|
||||
(scm/datum->syntax
|
||||
(scm/improper-list #scm/stx a
|
||||
#scm/stx b))))
|
||||
|
||||
(t/deftest spec-prim-lambda-test
|
||||
(t/are [x] (s/valid? ::sut/prim-lambda x)
|
||||
#scm/stx (#scm/stx lambda
|
||||
#scm/stx (#scm/stx a)
|
||||
#scm/stx a)))
|
||||
Reference in new issue
Block a user