Created
February 7, 2018 06:12
-
-
Save quoll/47c0abc7a3558a2503c87f285d922104 to your computer and use it in GitHub Desktop.
Updates test reports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns test-diff.util | |
(:require [clojure.test] | |
[clojure.data])) | |
(defmethod clojure.test/assert-expr '= [msg form] | |
(let [args (rest form) | |
report (clojure.test/assert-predicate msg form)] | |
(concat (butlast report) | |
(list | |
`(let [[f# s#] (clojure.data/diff ~@args)] | |
(println " diff:") | |
(prn f#) | |
(prn s#)) | |
(last report))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment