quickcheck
quickcheck copied to clipboard
Strictness for crashes interacts in funny ways with shrinking
Consider the following:
$> quickCheck $ forAllShrink (pure undefined) (\ () -> []) $ \ () -> True
*** Failed! (after 1 test):
Exception while generating shrink-list:
Prelude.undefined
CallStack (from HasCallStack):
undefined, called at <interactive>:8:33 in interactive:Ghci7
Exception thrown while showing test case:
Prelude.undefined
CallStack (from HasCallStack):
undefined, called at <interactive>:8:33 in interactive:Ghci7
The fact that the first thing the user sees when they've screwed up in the generator is that the shrinker failed is not optimal.