   (:gen-class))
 
 
-(defn assert-result [f msg]
+(defn assert-result
+  "Wraps benchmark function to assert it always returns `true`.
+
+  `msg` is formatted with the arguments passed to benchmark function,
+  and used as a custom assertion failure message."
+  [f msg]
   (fn [& args]
     (let [r (apply f args)]
       (assert r (format msg args))
-      r)))
+      nil)))
 
 
 (defn final-summary [groups results chart-path]

            (into {}))])))


(defn prepare-benchmarks [alternatives inputs]
  (->> (for [[lib-name lib-ns] alternatives]
         [lib-name
          (->> (for [[test-name test-data] inputs]

      (require [lib-ns])))


(defn run-benchmarks
  "Replaces benchmark function & inputs with the results of running the
  benchmark."
  [benchmarks bench-fn]
  (let [flattened (for [[lib-name lib-data] benchmarks
                        [test-name test-data] lib-data
                        [valid? {test-fn :fn inputs :inputs}] test-data]
