nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
706 stars 119 forks source link

Buggy interaction between `discard` and `cover` #406

Closed MaximilianAlgehed closed 1 month ago

MaximilianAlgehed commented 1 month ago

This bug slipped by the previous release:

quickCheck $ cover 10 discard "a" True

This change works to address the issue:

-cover p x s = mapTotalResult f . classify x s
+cover !p !x !s = mapTotalResult f . classify x s