Created
December 10, 2011 22:32
-
-
Save jennifersmith/1456771 to your computer and use it in GitHub Desktop.
Really really basic test runner :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro check [ code expected] | |
`(if (= ~code ~expected) | |
(do | |
(println "Success: " '~code " does indeed equal " ~expected ) true ) | |
(do | |
(println "FAIL: " '~code " does not sadly equal " ~expected ) false ))) | |
(check (+ 4 1) 4) ;; FAIL: (+ 4 1) does not sadly equal 4 | |
(check (range 4) 4) ;; Success: (range 4) does indeed equal [0 1 2 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment