SHARE
TWEET

Untitled

a guest Feb 17th, 2012 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;; Test that are throws if too few/many values are given
  2. (deftest are-throws-on-arity-mismatch
  3.   ;; No args at all
  4.   (is (thrown? IllegalArgumentException
  5.                (macroexpand-1 '(are [a] (constantly true))))
  6.       "Should error")
  7.   ;; Too many
  8.   (is (thrown? IllegalArgumentException
  9.                (macroexpand-1 '(are [a b] (constantly true)
  10.                                     1 2 3)))
  11.       "Should error")
  12.   ;; Too few
  13.   (is (thrown? IllegalArgumentException
  14.                (macroexpand-1 '(are [a b c] (constantly true)
  15.                                     1 2)))
  16.       "Should error"))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top