This commit is contained in:
msyds committed 2026-09-17 10:21:04 -06:00
1 parent 6f09eeeded
commit 36ca99b64a
2 files changed
+63 -36

No files matched your search

+10 -2
View File
@@ -28,9 +28,12 @@
'(a b) nil nil '(a b)
'(a) 'b nil '(a b ...)
'(a) 'b '(c) '(a b ... c)
'(a) 'b '(c d) '(a b ... c d)))
'(a) 'b '(c d) '(a b ... c d))
(t/are [p] (s/invalid? ::pattern p)
'... '(...) '(... a b c)
'(a ... b ...)))
(t/testing "simple data"
(t/is (= 'a (sut/parse-pattern 'a)))))
(t/is (= 'a (sut/conform ::patern 'a)))))
(t/deftest expand-test
(t/testing "unbound symbol"
@@ -81,3 +84,8 @@
'(syntax-rules
()
((m) 123)))))
(t/deftest unify-test
(t/are [result pattern datum] (= result (sut/unify pattern datum))
{'a 123 'b 456} '(a b) '(123 456)
nil '(a b) 123))