Skip to content

Instantly share code, notes, and snippets.

@mdemare
Created November 9, 2009 19:57
Show Gist options
  • Save mdemare/230225 to your computer and use it in GitHub Desktop.
Save mdemare/230225 to your computer and use it in GitHub Desktop.
(use 'clojure.contrib.pprint)
(defn assert-equal [expected actual]
(if (not= expected actual)
(throw
(AssertionError.
(str "\nExpected\n"
(with-out-str (pprint expected))
"\ngot\n"
(with-out-str (pprint actual)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment