Some of my HUnit tests compare fairly large structures with assertEqual. It’s hard to spot errors in these since HUnit prints the strings on one line. What I’d like to do is use Text.Groom to pretty print these structures, but if I pass a string to assertEqual the line breaks are displayed as \n so it makes the output even harder to read.
How do I make HUnit, assertEqual in particular, print the groomed strings with linebreaks?
assertEqualis just a call toassertBoolwith the equality comparison as theBooland the shown version of your data structures as theString. So write yourself a function that callsassertBoolwith a different error string and you’re done.