inc-report-counter

clojure.contrib.test-is

  • (inc-report-counter name)
Increments the named counter in *report-counters*, a ref to a map.
Does nothing if *report-counters* is nil.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/test.clj:308 top

(defn inc-report-counter
  "Increments the named counter in *report-counters*, a ref to a map.
  Does nothing if *report-counters* is nil."
  {:added "1.1"}
  [name]
  (when *report-counters*
    (dosync (commute *report-counters* assoc name
                     (inc (or (*report-counters* name) 0))))))
Vars in clojure.contrib.test-is/inc-report-counter: assoc commute defn dosync inc name or when
Used in 0 other vars

Comments top

No comments for inc-report-counter. Log in to add a comment.