venantius / ultra

A Leiningen plugin for a superior development environment
Eclipse Public License 1.0
1.24k stars 35 forks source link

prn-diff: dispatch by types of diffs, not actual/expected #38

Closed aeriksson closed 9 years ago

aeriksson commented 9 years ago

Note: this fixes issue #37

This means that diffs will be printed whenever possible.

For example, a comparison like:

(is (= (hash-map 1 1) (array-map 1 2)))

will now result in:

...
expected: {1 1}
  actual: {1 2}

    diff: - {1 1}
          + {1 2}

rather than:

expected: {1 2} to be an instance of clojure.lang.PersistentArrayMap
     was: {1 2} is an instance of clojure.lang.PersistentArrayMap
venantius commented 9 years ago

This looks good to me. I don't suppose there's any chance I could coax you into writing some tests around this behavior? This part of Ultra is woefully under-tested.

venantius commented 9 years ago

Merging for now, I suppose. It's not like this is an expansion of the codebase.