SimpleCheck is a small Haskell property-testing framework organized as Test.SimpleCheck. It runs properties against randomly generated values, providing a practical base for testing program specifications. section 9.2
Testing ROT13 symmetry
A property test can assert that applying ROT13 twice returns the original string: s == rot13 (rot13 s). With asciiString and 100 generated cases, the test checks symmetry across human-readable ASCII characters rather than only letters. section 9.2
SimpleCheck supports the essential workflow of randomized property testing:
- Define a property as a function over generated input. section 9.2
- Choose a random generator suited to the property, such as asciiString. section 9.2
SimpleCheck also exposes the trade-offs that motivate QuickCheck: generator construction is laborious, properties are difficult to compose, test data is hard to inspect, preconditions are unavailable, and failures are not minimized. section 9.3
