This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
Releases: jcornaz/kwik
Releases · jcornaz/kwik
0.1.0-alpha.4
Added
filter
operator for generators- (Breaking)
samples
property in theGenerator
interface to improve management of the value samples (edge-cases) forAll
non-inline function, allowing to hide implementation details.+
operator for generator, allowing to merge 2 generators.
Example:nonZeroInts() = ints(max = -1) + ints(min = 1)
Changed
- (Breaking) Renamed arguments
from
anduntil
offloats
anddoubles
generators
for more consistency with the int and long generators - (Breaking) Make the lambda of
forAll
crossinline, to allow usage of a non-inline function and hide implementation details. - Now the size probability for strings a collections generators is similar for all sizes.
Instead, they have empty and singletons instances as samples combine
andcombineWith
now start by a combination of the source generators and will randomly add samples in the random generations.- Prevent error when passing a big min size/length without a max size/length for collection and strings generators
Removed
- (Breaking)
ratio
argument from thewithSamples
andwithNull
operators
0.1.0-alpha.3
Added
Generator.combine
as a style alternative to combine generators
Changed
- (Breaking)
zip
operator renamed tocombineWith
for better clarity and discoverability
0.1.0-alpha.2
Added
ints
,longs
,floats
,doubles
andboolean
generatorsmap
operator to transform an existing generatorGenerator.of()
to create a generate from a finite set of samplesenum
to create a generator from an enumstrings
to create a String generatordefault
Capable of inferring what generator to return for a given type.lists
,sets
andmaps
generators
Changed
- Default generator arguments added in
forAll
andcheckForAll
.
Removed
checkForAll
functions as it was unsafe, allowing to forget assertions without compile-time error.
0.1.0-alpha.1
Added
Generator
interface for generating random valuesrandomSequence
helper to easily create a random (yet predictable) sequence of valueforAll
andcheckForAll
function to assess a property of the system under test.withSample
andwithNull
to inject constants values to be always testedzip
operator to combine two given generators