This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
Releases: ponylang/ponycheck
Releases · ponylang/ponycheck
0.7.0
Update to work with latest ponyc
The most recent ponyc implements RFC #65 which changes the type of Env.root
.
We've updated accordingly. You won't be able to use this and future versions of the library without a corresponding update to your ponyc version.
[0.7.0] - 2022-01-16
Changed
- Update for change in type of Env.root (PR #58)
0.6.1
0.6.0
0.5.4
Prep for 0.5.4 release [skip ci]
0.5.3
Prep for 0.5.3 release [skip ci]
0.5.2
Prep for 0.5.2 release [skip ci]
0.5.1
Prep for 0.5.1 release [skip ci]
0.5.0
Breaking
Property1
and all other Property classes got their property
method changed from fun box
to fun ref
. The idea behind i is that you can access and mutate state within your property class now (e.g. increase a counter or whatever).
Added
- We now have classes
Property2
,Property3
andProperty4
if you want to generate multiple values for your property. Example:
class SuccessfulProperty2 is Property2[U8, U8]
fun name(): String => "2-element-property"
fun gen1(): Generator[U8] => Generators.u8(0, 1)
fun gen2(): Generator[U8] => Generators.u8(2, 3)
fun ref property2(arg1: U8, arg2: U8, h: PropertyHelper) =>
h.assert_true((arg1 + arg2) >= arg1)
h.assert_true((arg1 + arg2) >= arg2)
- For cases like above, where you would actually want to test something against all possible integer types we now have:
IntProperty
andIntPairProperty
to have properties that are checked on all int-types. To see them in action, check out: https://github.com/mfelsche/stdlib-properties/blob/master/stdlib-properties/main.pony
0.4.1 - Updates for current Ponylang
- Update for current ponyc compiler and remove unsafe pattern matches
- Update documentation for new ponylang docs theme
v0.4.0 - Partial Generators
Fixed
- The reported sample after shrinking was the wrong one in case it was shrinking down to a successful sample. Issue #36 fixed by PR #38
Changed
Generator.generate
is now partial and it is now trivial to write Generators for objects that are created by some partial functions. When a Generator errors during sample generation, it is retries up to a number of retries configurable viaPropertyParams.max_generator_retries'
(default is 5).- In that realm, the
Generators
API changed.Generators.one_of
andGenerators.frequency
are not partial anymore. When they are called with no-element Seqs, the resultingGenerator
will always error. Safe alternatives have been added, keeping the old behavior available:Generators.one_of_safe
andGenerators.frequency_safe
.