All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Require
prng
>= 4.0.1 (#7) - Fix some tests that were broken on JS target
0.0.8 - 2024-12-31
BitArray
generatorsUtfCodepoint
(unicode codepoint) generatorchar_utf_codepoint
which can be used in string generators to generate strings composed of valid unicode codepoints
- These functions have been renamed to fit with the
type_modifier
naming scheme:small_positive_or_zero_int
->int_small_positive_or_zero
small_strictly_positive_int
->int_small_strictly_positive
0.0.7 - 2024-12-11
- Addressed deprecations
iterator
=>yielder
regex
=>regexp
string_builder
=>string_tree
0.0.6 - 2024-09-30
qcheck.parameter
to simplify the creation of curried function for the applicative style of building generators.
- All occurrences of
prng/seed.Seed
type have been replaced withqcheck.Seed
.
- Removed
map4
,map5
, andmap6
from theqcheck
module. (It is better to use the applicative style withqcheck.parameter
anduse
.)
0.0.5 - 2024-09-23
qcheck.from_float_weighted_generators
- This function was previously called
qcheck.from_weighted_generators
.
- This function was previously called
- Changed the implementation of
small_positive_or_zero_int
, which results in a >2x speed up of many of the string generators. - Replace some of the
prng
random functions with internal implementations based on integer generation, which speeds up generators that depend on them.- Replace
prng/random.choose
, which speeds up the float and bool generation. - Replace
prng/random.uniform
, which speeds up the generators that depend onfrom_generators
orchar_from_list
. - Replace
prng/random.weighted
.
- Replace
qcheck.from_weighted_generators
now takes integer weights rather than float weights.- The default test count for
qcheck.default_config
is 1000 now rather than 10,000.
- Fixed a bug in the calling of JS FFI.
0.0.4 - 2024-09-16
- Top-level
qcheck
module- All public functionality now lives in this module.
- Any other modules should be considered internal or private.
dict_generic
uses a minimum size of0
rather than1
.- Though most functions moved into the
qcheck
module with their original name, some were renamed. Here are a few of the important ones.qcheck/qtest/config.default
->qcheck.default_config
qcheck/generator.make_primitive
->qcheck.make_primitive_generator
qcheck/shrink
functions are now prefixed withshrink_
, e.g.,qcheck.shrink_int_towards_zero
.qcheck/tree
apply
->qcheck.apply_tree
bind
->qcheck.bind_tree
iterator_list
->qcheck.sequence_list
make_primitive
->qcheck.make_primitive
map
->qcheck.map_tree
map2
->qcheck.map2_tree
option
->qcheck.option_tree
return
->qcheck.return_tree
to_string
->qcheck.tree_to_string
- Some public types and functions were made private
- All public functions that were in
qcheck/utils
qcheck/shrink
do_shrink
do_shrink_result
shrink
do_shrink
- All public functions that were in
These public functions and types were removed.
qcheck/qtest/test_error.new_string_repr
qcheck/qtest/test_error.TestErrorDisplay
0.0.3 - 2024-05-15
qtest.given
andqtest.given_result
functions for running property tests with the default configuration.
qtest.run
andqtest.run_result
now both returnNil
on property success, and panic on property failure.- Panics inside property functions are treated as property failures and are handled, which allows shrinking to occur.
- This allows users to use assertions to bail out of a test at any time when it is more convenient to do so.
- Also, it removes the need to check that
run
andrun_result
returnOk(Nil)
to signal a successful property. Rather, no further action needs to be taken on success, as failures will panic, which should be handled by the testing framework.
- Property success/failure
qtest.run
now fails ether if the property returnsFalse
or if there is a panic in the property.qtest.run_result
now fails ether if the property returnsError
or if there is a panic in the property.
- Panics inside property functions are treated as property failures and are handled, which allows shrinking to occur.
- Shrinking functions return the number of shrink steps along with the shrunk value.
- Counter-example info now includes original value, shrunk value, shrink steps, and the relevant error message.
0.0.2 - 2024-05-06
- Add
float_uniform_inclusive
generator
- Change argument names and labelled arguments
- Improve performance of character generators
char
,char_print
, andchar_alpha_numeric
0.0.1 - 2024-04-28
- Initial release!