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.
- Add function
dicetest::dice::todo
. This generator is for prototyping and always panics when created. - Add functions
dicetest::dice::split_{u8,u16,u32,u64,u128,usize}
. These generators are similar todicetest::dice::split_{u8,u16,u32,u64,u128,usize}_n
, but use a const parameter for the number of parts. - Add function
dicetest::dice::split_vec_n
. This generators is similar todicetest::dice::split_vec
, but uses a non-const parameter for the number of parts. - Add function
dicetest::dice::split_limit
. This generator splits adicetest::Limit
into random parts. - Add function
dicetest::dice::split_limit_n
. This generators is similar todicetest::dice::split_limit
, but uses a non-const parameter for the number of parts. - Add support for regression tests
- Add function
dicetest::Dicetest::regression
for adding a regression test. - Add function
dicetest::Dicetest::regressions_enabled
for enabling/disabling regression tests. - Add environment variable
DICETEST_REGRESSIONS_ENABLED
for enabling/disabling regression tests. - Add struct
dicetest::runner::repeatedly::Regression
and fielddicetest::runner::repeatedly::Config::regressions
.
- Add function
- Fix unintentional panic in
dicetest::dice::weighted_*
if sum of weights is zero.
- Rename functions
dicetest::dice::terms_of_{u8,u16,u32,u64,u128,usize}
todicetest::dice::split_{u8,u16,u32,u64,u128,usize}_n
. - Change signature of
dicetest::dice::split_vec
. Instead of returning a pair with two parts, it now has a type parameterconst N: usize
and returns an array withN
parts. - Rename feature flag
rand_full
torand
. - Upgrade dependency rand_core to 0.6 and rand to 0.8.
- Remove feature flag
quickcheck_full
and the integration ofquickcheck::Gen
andquickcheck::Arbitrary
due to missing functionality in quickcheck 1.0.
0.3.1 - 2022-02-27
- Fix unintentional panic in
dicetest::dice::one_of_die_once
anddicetest::dice::one_of_die
.
0.3.0 - 2021-09-10
- Add function
dicetest::dice::shuffle_slice
. This allows to shuffle a slice in-place. - Add function
dicetest::dice::array
. This allows to generate arrays using const generics.
- Remove function
dicetest::dice::array_1
, ...,dicetest::dice::array_32
. Usedicetest::dice::array
instead.
- Rename
dicetest::dice::size
todicetest::dice::length
anddicetest::dice::SizeRange
todicetest::dice::LengthRange
. This expresses better their intention and prevents confusion withdicetest::dice::usize
anddicetest::dice::isize
. - Reorganize functions
dicetest::dice::zip*
,dicetest::dice::one_of*
anddicetest::dice::weighted_one_of*
. For each group of functions with same functionality but different arity a struct is added that bundles these functions as methods. E.g. instead ofdice::one_of_2(1, 2)
you can write nowdice::one_of().two(1, 2)
.
0.2.1 - 2020-12-05
- Add function
dicetest::Fate::roll_distribution
. This allows to generate values directly from arand::distributions::Distribution
. - Add optional feature flag
quickcheck_full
. This enables the integration ofquickcheck::Arbitrary
. - Implement
rand_core::RngCore
fordicetest::Fate
. - Implement
quickcheck::Gen
fordicetest::Fate
. - Add function
dicetest::Fate::roll_arbitrary
. This allows to generate values for a type that implementsquickcheck::Arbitrary
. - Add function
dicetest::dice::arbitrary
. This allows to create adicetest::Die
for a type that implementsquickcheck::Arbitrary
. - Add struct
dicetest::hints::Section
. - Add marco
dicetest::hint_section
. This makes it easier to work with hint indents.