Move test assertions into a test function
This commit is contained in:
parent
38fdcc2114
commit
906b470499
@ -15,8 +15,7 @@
|
|||||||
(rev (.append x 1) (.append x 2) (.append x 3))
|
(rev (.append x 1) (.append x 2) (.append x 3))
|
||||||
(assert (= x [3 2 1])))
|
(assert (= x [3 2 1])))
|
||||||
|
|
||||||
; Macros returning constants
|
(defn test-macros-returning-constants []
|
||||||
|
|
||||||
(defmacro an-int [] 42)
|
(defmacro an-int [] 42)
|
||||||
(assert (= (an-int) 42))
|
(assert (= (an-int) 42))
|
||||||
|
|
||||||
@ -50,7 +49,8 @@
|
|||||||
(assert (= (a-set) #{1 2}))
|
(assert (= (a-set) #{1 2}))
|
||||||
|
|
||||||
(defmacro a-none [])
|
(defmacro a-none [])
|
||||||
(assert (= (a-none) None))
|
(assert (= (a-none) None)))
|
||||||
|
|
||||||
|
|
||||||
; A macro calling a previously defined function
|
; A macro calling a previously defined function
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user