Now handles things which throw exceptions
This commit is contained in:
parent
06f16d561f
commit
f65185b963
|
@ -1,11 +1,9 @@
|
|||
(ns testgen.core)
|
||||
|
||||
(defn foo
|
||||
"I don't do a whole lot."
|
||||
[x]
|
||||
(println x "Hello, World!"))
|
||||
|
||||
(defn write-test [fnname arg]
|
||||
(list 'is (list '= (list fnname arg) (eval (list fnname arg)))))
|
||||
(try
|
||||
(list 'is (list '= (list fnname arg) (eval (list fnname arg))))
|
||||
(catch Exception e (list 'is (list 'thrown? (.getClass e) (list fnname arg))))))
|
||||
|
||||
|
||||
(defn testgen [fndef] nil)
|
||||
|
|
Loading…
Reference in a new issue