0.19
This release brings a range of new features and improvements, detailed below.
-
new features and feature extensions
- add optional
debug_shrink
parameters in alcotest interface and expose defaultdebug_shrinking_choices
in test runners - add missing
?handler
parameter toTest.check_cell_exn
- add an option
retries
parameter toTest.make
et al. for checking a property repeatedly while shrinking.
This can be useful when testing non-deterministic code. #212 - add
tup2
totup9
for generators - add
Test.make_neg
for negative property-based tests, that are expected not to satisfy the tested property. - add environment variable
QCHECK_LONG_FACTOR
similar toQCHECK_COUNT
#220 - rename
Gen.opt
toGen.option
but keep the old binding for compatibility. - shrinker changes
- recursive
list
shrinker with better complexity string
shrinker reuses improvedlist
shrinker and addschar
shrinking- function shrinker now shrinks default entry first and benefits from
list
shrinker improvements - replacing the linear-time
char
shrinker with a faster one reusing the bisectingint
shrinker algorithm - add
Shrink.char_numeral
andShrink.char_printable
- add shrinking for
char arbitrary
schar
,printable_char
, andnumeral_char
- recursive
- add optional
-
bug fixes
- fix function generation affecting reproducability #236
- fix distribution of
QCheck2.printable
which would omit certain characters - use
Float.equal
for comparingfloat
s in theObservable
module underlying function generators.
-
documentation updates:
- clarify upper bound inclusion in
Gen.int_bound
andGen.int_range
- clarify
printable_char
andGen.printable
distributions - add missing
string_gen_of_size
andsmall_printable_string
documentation - document
QCheck_alcotest.to_alcotest
- fix documented size distribution for
arbitrary
generatorsstring_gen
,string
,printable_string
,numeral_string
,list
, andarray
- fix exception documentation for
check_result
,check_cell_exn
, andcheck_exn
- fix documentation for the distribution of
Gen.printable
andprintable_char
- fix documentation for the shrinking behaviour of
QCheck2.printable
- clarify upper bound inclusion in
-
internal and test suite changes
- add additional expect and unit tests and refactor expect test suite
- add a shrinker performance benchmark #177
- remove
--no-buffer
option ondune runtest
to avoid garbling the test output - make test suite run on 32-bit architectures