Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (use '[clojure.test :only [deftest testing is run-tests]])
- (defmacro throws-exception [exp]
- `(is (thrown? Exception ~exp)))
- ; What i'm hoping is to write this
- (deftest my-tests
- (testing "things..."
- (throws-exception (first 'hotdog))))
- ; Exception
- ; Syntax error compiling at (./basics.clj:30:5).
- ; No such var: user/thrown?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement