Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Test that are throws if too few/many values are given
- (deftest are-throws-on-arity-mismatch
- ;; No args at all
- (is (thrown? IllegalArgumentException
- (macroexpand-1 '(are [a] (constantly true))))
- "Should error")
- ;; Too many
- (is (thrown? IllegalArgumentException
- (macroexpand-1 '(are [a b] (constantly true)
- 1 2 3)))
- "Should error")
- ;; Too few
- (is (thrown? IllegalArgumentException
- (macroexpand-1 '(are [a b c] (constantly true)
- 1 2)))
- "Should error"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement