Okay, as I learned via my previous question, the RWH book is already out of date for QuickCheck. And despite all the posts I\'ve read that tell me how incredibly simple it i
For those who want to run all tests at once and provide their configuration:
return []
main = $forAllProperties (quickCheckWithResult stdArgs { maxSuccess = 500 })
You are looking for:
quickCheckWith stdArgs { maxSuccess = 5000 } someProp
How I found out
quickCheck
was the Args
type with a maxSuccess
field.Args
- finding stdArgs
. (Use your browsers search function - ctrl-f usually). OTOH, I could have used hoogle.Args
type somewhere so I kept looking. The next line was quickCheckWith
- bingo! On the other hand, I could have used hoogle.How Else Can You Find Out
As I stated above, you could have used hoogle to find a lot of the functions, assuming you realize the Args
type is the core of what you need (from the haddocks).
Otherwise, you are probably reduced to looking at what other packages do, which means you need to know what other packages are worth looking at. The examples folder in QuickCheck seems obvious, but not all packages include such examples. Using reverse dependencies you can often find a package to look at, but for QC lots of packages don't have explicit dependencies.