Skip to content

Releases: c-cube/qcheck

0.25

05 Apr 12:53
Compare
Choose a tag to compare

The 0.25 release contains a combination of all-round fixes, documentation, and polishing:

  • Restore Test.make's max_fail parameter which was accidentally broken in 0.18
  • Adjust stats computation of average and standard deviation to
    limit precision loss, print both using scientific notation, and
    workaround MinGW float printing to also pass expect tests
  • Fix dune snippets missing a language specifier in README.adoc
    causing asciidoc to error
  • Add a note to QCheck{,2.Gen}.small_int_corners and QCheck{,2}.Gen.graft_corners
    about internal state, and fix a range of documentation reference warnings
  • Reorganize and polish the README, rewrite it to use qcheck-core, and add
    a QCheck2 integrated shrinking example
  • Document QCHECK_MSG_INTERVAL introduced in 0.20
  • Add QCheck{,2}.Gen.map{4,5} combinators

The accompanying ppx_deriving_qcheck.0.7 release offers:

  • Support ppxlib.0.36.0 based on the OCaml 5.2 AST

Thanks to @Pat-Lafon and @patricoferris for contributing PRs! 🎉

0.24

27 Feb 17:38
Compare
Choose a tag to compare

This 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. The release also adds missing result, int32, and int64 combinators.

The full change log:

  • [qcheck-alcotest] Add an optional speed_level parameter to to_alcotest
  • Adjust the QCheck2.Gen.list shrinker to produce minimal counterexamples at size 3 too
  • Replace the QCheck2 OCaml 4 Random.State.split hack with a faster one
  • Improve the QCheck2.Gen.list shrinker heuristic and utilize the improved shrinker in other QCheck2 {list,array,bytes,string,function}* shrinkers
  • Use split and copy in Random.State underlying QCheck2 to avoid non-deterministic shrinking behaviour
  • Add missing documentation strings for QCheck.{Print,Iter,Shrink,Gen} and QCheck2.Gen.
  • Add result combinators to QCheck, QCheck.{Gen,Print,Shrink,Observable}, and QCheck2.{Gen,Print,Observable}.
  • Add missing combinators QCheck{,2}.Print.int{32,64}, QCheck.Gen.int{32,64}, QCheck{,2}.Observable.int{32,64}, and deprecate QCheck.Gen.{ui32,ui64}
  • Document dune usage in README

0.23

13 Dec 14:08
Compare
Choose a tag to compare
  • Quote and escape in Print.string and Print.char in the QCheck module, mirroring the QCheck2.Print module's behaviour. Also quote and escape Print.bytes in both QCheck and QCheck2.
  • Clean-up QCheck and QCheck2 documentation pages
  • Add exponential generator to QCheck, QCheck.Gen, and QCheck2.Gen
  • Add Shrink.bool and use it in QCheck.bool
  • Remove unread fun_gen field from QCheck2's fun_repr_tbl type thereby silencing a compiler warning

0.22

08 Jul 13:06
Compare
Choose a tag to compare
  • Remove QCheck2.TestResult.get_instances as retaining previous test inputs cause memory leaks (#288)
  • Make QCheck2.state.res immutable, silencing a compilation warning (#291)

0.21.3

07 Dec 08:54
Compare
Choose a tag to compare
  • Drop the dependency on base-bytes as it is provided in all supported versions of the OCaml compiler

0.21.2

29 Aug 08:35
Compare
Choose a tag to compare
  • Reintroduce the Shrink.list_spine fix by catching Invalid_argument and falling back on an address comparison.
  • Fix #273 by lowering ppx_deriving_qcheck's qcheck dependency to qcheck-core

0.21.1

23 May 10:10
Compare
Choose a tag to compare

This is a bugfix release to fix a regression:

  • Roll back the Shrink.list_spine fix, as it was utilizing polymorphic equality that can raise an exception on function comparison.

0.21

16 May 11:24
Compare
Choose a tag to compare

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, and Test.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 unbound gen 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 affecting QCheck.Shrink.{char,string}
  • fix a cornercase where Shrink.list_spine would emit duplicates

0.20

07 Nov 21:31
Compare
Choose a tag to compare

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 control QCheck_base_runner.time_between_msg
  • fix unknown option error message referring to qtest

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