Created
March 31, 2014 13:14
-
-
Save arr-ee/9892004 to your computer and use it in GitHub Desktop.
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 defdyntest | |
[test-meta test-name & test-body] | |
`(let [fn# (deftest ~test-name ~@test-body)] | |
(alter-meta! fn# merge ~test-meta) | |
fn#)) | |
(let [tname (symbol 'test-1)] | |
(defdyntest {} tname (println 1))) | |
; => #'user/tname | |
;; this should be #'user/test-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment