Clojure

clojure.test/are does not fail with insufficient arguments

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: Backlog
  • Fix Version/s: Backlog
  • Component/s: None
  • Labels:
    None

Description

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)
nil
user=> (deftest foo (are [x y] (= x y) 1 1 2 2 3 4))
#'user/foo
user=> (foo)

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

Activity

Tassilo Horn made changes -
Field Original Value New Value
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: