4 ms·
> If you want to try everything, have a look at SmallCheck. FYI my favourite approach is LazySmallCheck, which runs tests with an unevaluated input, and only g
by chriswarbo 5y ago
> If you want to try everything, have a look at SmallCheck.
FYI my favourite approach is LazySmallCheck, which runs tests with an unevaluated input, and only generates data if the input gets forced; at which point it runs the test for each constructor. The original version lacked some useful generators, like functions; the "LazySmallCheck2012" fork added these (e.g. generating functions in terms of an input/output lookup table), but overall these libraries seem to be unmaintained :(
IIRC there are also similar alternatives based around Prolog-like search.