code.test.checker.collection
contains
added in 3.0
(contains x & modifiers)contains-in
macro
added in 3.0
(contains-in x)shorthand for checking nested maps and vectors
((contains-in {:a {:b {:c odd?}}}) {:a {:b {:c 1 :d 2}}}) => true
((contains-in odd? {:a {:b even?}}) 3 {:a {:b 4 :c 5}}) => true
contains-set
added in 3.0
(contains-set x)contains-vector
added in 3.0
(contains-vector x)(contains-vector x modifiers)vector check helper function for contains
just
added in 3.0
(just x & modifiers)just-in
macro
added in 3.0
(just-in x)shorthand for exactly checking nested maps and vectors
((just-in {:a {:b {:c odd?}}}) {:a {:b {:c 1 :d 2}}}) => false
((just-in odd? {:a {:b even?}}) 3 {:a {:b 4}})
((just-in odd? {:a {:b even?}}) 3 {:a {:b 4}}) => true
just-set
added in 3.0
(just-set x)set check helper function for just
((just-set #{1 2 3}) 1 2 3) => true
just-vector
added in 3.0
(just-vector x)(just-vector x modifiers)vector check helper function for just
throws-info
added in 3.0
(throws-info)(throws-info m)checker that determines if an ex-info has been thrown
((throws-info {:a “hello” :b “there”}) (process/evaluate {:form ’(throw (ex-info “hello” {:a “hello” :b “there”}))})) => true
verify-map
added in 3.0
(verify-map ck data)takes two maps and determines if they fit (verify-map {:a (base/satisfies odd?) :b (base/satisfies even?)} {:a 1 :b 2}) => true
verify-seq
added in 3.0
(verify-seq ck data modifiers)takes two seqs and determines if they fit (verify-seq (base/satisfies 1) (base/satisfies 2) 2 1 #{:in-any-order}) => true
(verify-seq (base/satisfies 1) (base/satisfies 2) 2 3 1 #{:in-any-order :gaps-ok}) => true