I have a QuickCheck property that looks like this:
prop42 :: Foo -> Bool
prop42 foo = fn1 foo == fn2 foo
If this property fails, it will print out what foo
was. But I'd really like to know what fn1
and fn2
returned. And if foo
is large, it's kinda non-trivial to generate this information by hand. (I.e., sit there and manually type in the huge wedge of text printed to the Windows console window.)
It's common for testing frameworks to have a thing that compares for equality, and prints out both values if equality didn't hold. But I can't seem to find such a function for QuickCheck...