<< Back to previous view

[CLJ-806] clojure.test/are does not fail with insufficient arguments Created: 03/Jun/11  Updated: 16/Feb/12  Resolved: 16/Feb/12

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Backlog
Fix Version/s: Backlog

Type: Defect Priority: Minor
Reporter: Stuart Sierra Assignee: Stuart Sierra
Resolution: Duplicate Votes: 0
Labels: None


If clojure.test/are is given an argument set with missing parameters, it silently ignores the extra parameters at the end instead of failing.

Clojure 1.3.0-master-SNAPSHOT
user=> (use 'clojure.test)
user=> (deftest foo (are [x y] (= x y) 1 1 2 2 3 4))
user=> (foo)

FAIL in (foo) (NO_SOURCE_FILE:6)
expected: (= 3 4)
  actual: (not (= 3 4))
user=> (deftest missing-argument (are [x y] (= x y) 1 1 2 2 3))
user=> (missing-argument)
nil  ;; doesn't fail

Comment by Tassilo Horn [ 16/Feb/12 11:43 AM ]

Duplicate of CLJ-931. (Well, basically the other way round, but CLJ-931 has a fix attached, so I close this one.)

Generated at Fri Jan 19 04:16:33 CST 2018 using JIRA 4.4#649-r158309.