Skip to content

Releases: c-cube/qcheck

0.19.1

18 Jul 15:57
Compare
Choose a tag to compare

Bugfix release:

  • fix: allow ~count in Test.make to be 0
  • fix: allow ~long_factor in Test.make to be 0

0.19

09 Jul 10:51
Compare
Choose a tag to compare

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 default debug_shrinking_choices in test runners
    • add missing ?handler parameter to Test.check_cell_exn
    • add an option retries parameter to Test.make et al. for checking a property repeatedly while shrinking.
      This can be useful when testing non-deterministic code. #212
    • add tup2 to tup9 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 to QCHECK_COUNT #220
    • rename Gen.opt to Gen.option but keep the old binding for compatibility.
    • shrinker changes
      • recursive list shrinker with better complexity
      • string shrinker reuses improved list shrinker and adds char 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 bisecting int shrinker algorithm
      • add Shrink.char_numeral and Shrink.char_printable
      • add shrinking for char arbitrarys char, printable_char, and numeral_char
  • bug fixes

    • fix function generation affecting reproducability #236
    • fix distribution of QCheck2.printable which would omit certain characters
    • use Float.equal for comparing floats in the Observable module underlying function generators.
  • documentation updates:

    • clarify upper bound inclusion in Gen.int_bound and Gen.int_range
    • clarify printable_char and Gen.printable distributions
    • add missing string_gen_of_size and small_printable_string documentation
    • document QCheck_alcotest.to_alcotest
    • fix documented size distribution for arbitrary generators string_gen, string, printable_string, numeral_string, list, and array
    • fix exception documentation for check_result, check_cell_exn, and check_exn
    • fix documentation for the distribution of Gen.printable and printable_char
    • fix documentation for the shrinking behaviour of QCheck2.printable
  • 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 on dune runtest to avoid garbling the test output
    • make test suite run on 32-bit architectures

0.18.1

03 Feb 19:59
7bc1265
Compare
Choose a tag to compare

bugfix release.

  • fix Gen.{nat,pos}_split{2,}
  • fix stack overflow in #156

0.18

10 Sep 18:01
2ad6a0f
Compare
Choose a tag to compare

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 of Gen.(string_of char) or the new Gen.string_printable
  • require at least OCaml 4.08

other changes:

  • unsigned int32 and int64
  • rename small_int_corners
  • add ?ratio to opt, to modify random distribution of options

0.17

15 Feb 21:46
Compare
Choose a tag to compare

many bugfixes, and addition of Gen.delay.

0.16

05 Nov 15:05
Compare
Choose a tag to compare

0.16, with a bugfix related to #99 and an improved default runner.

0.15

09 Sep 19:30
Compare
Choose a tag to compare
  • fix: in main runner, remove reset line in more places if colors=false
  • fix: invalid arg in int_range when a<0
  • fix(runner): do not use ansi code for random seed if colors=false
  • feat: on >=4.08, provide let operators

0.14

30 Jul 20:09
Compare
Choose a tag to compare
use dune-release

0.13

28 Jul 22:41
Compare
Choose a tag to compare
prepare for 0.13

0.10

09 Sep 15:34
Compare
Choose a tag to compare