kotest-property / io.kotest.property.arbitrary / MultiplesShrinker

MultiplesShrinker

class MultiplesShrinker : Shrinker<Int>

Constructors

<init>

MultiplesShrinker(multiple: Int)

Functions

shrink

Returns the "next level" of shrinks for the given value, or empty list if a "base case" has been reached. For example, to shrink an int k we may decide to return k/2 and k-1.

fun shrink(value: Int): List<Int>

Extension Functions

bimap

fun <A, B> Shrinker<A>.bimap(f: (B) -> A, g: (A) -> B): Shrinker<B>

rtree

Generates an RTree of all shrinks from an initial value.

fun <A> Shrinker<A>.rtree(a: A): RTree<A>