Move test assertions into a test function

This commit is contained in:
Kodi Arfer 2018-04-23 10:59:03 -07:00
parent 38fdcc2114
commit 906b470499

View File

@ -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