| Start |
|---|
| Randomly generating data for custom types The The minimal implementation of Here is an instance of |
Using implication (==>) to check properties with preconditions If you want to check that a property holds given that a precondition holds, you can use the |
| Declaring a property At its simplest, a property is a function which returns a A property declares a high-level invariant of a program. The QuickCheck test runner will evaluate the function with 100 random inputs and check that the result is always By convention, functions that are properties have names which start with |
| Checking a single property The If a property fails for some input, |
| Checking all the properties in a file
Note that the |
| Limiting the size of test data It can be difficult to test functions with poor asymptotic complexity using quickcheck as the random inputs are not usually size bounded. By adding an upper bound on the size of the input we can still test these expensive functions. By using |
Read Article
https://develop.horje.com/learn/1434/reference