I’m happy to announce the 0.24 release of qcheck
, qcheck-core
, qcheck-alcotest
, and qcheck-ounit
, along with a 0.6 release of ppx_deriving_qcheck
QCheck
is a library for randomized property-based testing, inspired by Haskell’s seminal QuickCheck library. The 0.24 release contains a range of improvements to the integrated shrinking of QCheck2
, initially introduced in the 0.18 release. As a consequence, its shrinking algorithms should act more predictably, reduce faster, and report smaller counterexamples. In essence, the 0.24 release is what we hoped 0.18 would be. The release also adds missing result
, int32
, and int64
combinators, as well as more documentation.
If you’ve previously given QCheck2
’s integrated shrinking a spin, I encourage you to try it again with the patched 0.24 release. For new users, the 0.24 release is also a good candidate to check out!
Please share any problems you encounter on the qcheck
repo: GitHub - c-cube/qcheck: QuickCheck inspired property-based testing for OCaml.
Full change log:
- [qcheck-alcotest] Add an optional
speed_level
parameter toto_alcotest
- Adjust the
QCheck2.Gen.list
shrinker to produce minimal counterexamples at size 3 too - Replace the
QCheck2
OCaml 4Random.State.split
hack with a faster one - Improve the
QCheck2.Gen.list
shrinker heuristic and utilize the improved shrinker in otherQCheck2
{list,array,bytes,string,function}*
shrinkers - Use
split
andcopy
inRandom.State
underlyingQCheck2
to avoid non-deterministic shrinking behaviour - Add missing documentation strings for
QCheck.{Print,Iter,Shrink,Gen}
andQCheck2.Gen
. - Add
result
combinators toQCheck
,QCheck.{Gen,Print,Shrink,Observable}
, andQCheck2.{Gen,Print,Observable}
. - Add missing combinators
QCheck{,2}.Print.int{32,64}
,QCheck.Gen.int{32,64}
,QCheck{,2}.Observable.int{32,64}
, and deprecateQCheck.Gen.{ui32,ui64}
- Document
dune
usage in README
Happy testing!