Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: Release 1.3
-
Fix Version/s: Release 1.4
-
Component/s: None
-
Labels:None
-
Patch:Code
-
Approval:Ok
Description
While clojure.test/are is a very useful macro, it has one major flaw. If the assertion is syntactically incorrect, the test succeeds. Take this testcase:
(deftest broken-test
(are [a b c] (= a b c)
1 1))
See the error? The are form takes three values, but I have provided only two. The test simply passes.
Latest patch checks the number of arguments to are and throws an exception if they don't match.
Is this the same issue as
CLJ-806? If so, it might be nice to close one with a comment that it is a duplicate of the other. GivenCLJ-806has no patch, and this one does, perhaps preferable to closeCLJ-806?CLJ-806? If so, it might be nice to close one with a comment that it is a duplicate of the other. GivenCLJ-806has no patch, and this one does, perhaps preferable to closeCLJ-806?