HUnit-Diff-0.1: Assertions for HUnit with difference reporting

Test.HUnit.Diff

Description

Very basic support for diffing with HUnit.

Limitations:

  • Prints the whole value, not just the difference with a few lines of context.
  • Relies on the similarity of pretty-printed show results which sorta-kinda works much of the time but may sometimes highlight differences too eagerly.
  • Always colors the differences for ANSI terminals, regardless of output target.

Despite these limitations, I find it more useful than HUnit's defaults.

Synopsis

Documentation

(@?==) :: (Eq a, Show a) => a -> a -> AssertionSource

Like @?= but producing a colored diff on failure.

(@==?) :: (Eq a, Show a) => a -> a -> AssertionSource

Like @=? but producing a colored diff on failure.