nick8325 / quickcheck

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

Question: How to interpret non-discrete number of shrinks as reported by QuickCheck >= 2.11? #196

Closed sol closed 6 years ago

sol commented 6 years ago

Steps to reproduce:

ghci> quickCheck $ \ (x :: Int) (y :: Int) -> (x == 0 && y == 1) ==> False
*** Failed! Falsifiable (after 1 test and 0.1 shrinks):  
0
1

Not sure if this is a bug? But looks fishy!

sol commented 6 years ago

For completeness, this is a regression introduced with 2.11.

sol commented 6 years ago

Trying other stuff:

> quickCheck ( < 10)
*** Failed! Falsifiable (after 12 tests and 1.4 shrinks):  
10

Apparently this is how it is now. How should I interpret e.g. 1.4 shrinks?

nick8325 commented 6 years ago

Ah, whoops.. 1.4 means 1 shrink and 4 unsuccessful shrink attempts, but it is only supposed to be used during shrinking. I'll fix it.

nick8325 commented 6 years ago

Should be fixed now!

nick8325 commented 6 years ago

Oh, now it says "1 shrinks". Bleargh.

nick8325 commented 6 years ago

Should be finally fixed now in 44379d9e.

sol commented 6 years ago

@nick8325 Thanks a lot!

I'm not going to support 2.11, 2.11.1 and 2.11.2 in hspec. Nick, how about deprecating these versions on Hackage?

nick8325 commented 6 years ago

Ah, good idea - done!