kotest-property / io.kotest.property.arbitrary / ListShrinker

ListShrinker

class ListShrinker<A> : Shrinker<List<A>>

Constructors

<init>

ListShrinker()

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: List<A>): List<List<A>>

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>