Releases: c-cube/qcheck
Releases · c-cube/qcheck
0.22
0.21.3
0.21.2
0.21.1
0.21
This release offers better negative test integration and furthermore fixes a couple of bugs in QCheck.Shrink
and in ppx_deriving_qcheck
:
- make
Test.check_result
,Test.check_cell_exn
, andTest.check_exn
honor test polarity by raising
Test_unexpected_success
when a negative test (expected to have a counter example), unexpectedly succeeds. - fix issue with
ppx_deriving_qcheck
deriving a generator with unboundgen
for recursive types #269
and a related issue when deriving a generator for a record type - fix #241 causing
QCheck.Shrink.int*
to emit duplicates, also affectingQCheck.Shrink.{char,string}
- fix a cornercase where
Shrink.list_spine
would emit duplicates
0.20
This release comes with a few new features and bug fixes, along with several new bytes
and string
combinators in an attempt to stream-line their names
- add several new
bytes
combinators:{QCheck,QCheck2}.Gen.{bytes_size,bytes,bytes_of,bytes_printable,bytes_small,bytes_small_of}
QCheck.{Print,Shrink,Observable}.bytes
QCheck2.{Print,Shrink}.bytes
QCheck.{bytes_gen_of_size,bytes_of,bytes,bytes_small,bytes_small_of,bytes_of_size,bytes_printable}
- add new
string
combinators and aliases:{QCheck,QCheck2}.Gen.{string_small,string_small_of}
QCheck.{string_small,string_small_of,string_of,string_printable,string_printable_of_size,string_small_printable,string_numeral,string_numeral_of_size}
- add an optional argument with conservative default to
Shrink.string
- fix shrinkers in
QCheck.{printable_string,printable_string_of_size,small_printable_string,numeral_string,numeral_string_of_size}
#257 - add
QCheck2.Gen.set_shrink
to modify the generator's shrinker - add
QCheck2.Gen.no_shrink
to build a generator with no shrinking - add an environment variable
QCHECK_MSG_INTERVAL
to controlQCheck_base_runner.time_between_msg
- fix unknown option error message referring to
qtest
0.19.1
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
0.18.1
0.18
This releases marks the addition of QCheck2
, a module where generation
and shrinking are better integrated.
See #109 and #116.
This API is still experimental. The normal QCheck
module is still there
and hasn't changed much.
deprecations and breakges:
- make
QCheck.Test_result.t
abstract and add missing getters - deprecate
QCheck.oneof
- deprecate
Gen.string_readable
in favor ofGen.(string_of char)
or the newGen.string_printable
- require at least OCaml 4.08
other changes:
- unsigned int32 and int64
- rename
small_int_corners
- add
?ratio
toopt
, to modify random distribution of options