kotest-property / io.kotest.property.internal

Package io.kotest.property.internal

Types

Counter

class Counter

PropertyFailureInput

Maps a failed property test arg to its shrunk value if any.

data class PropertyFailureInput<T>

Functions

checkMaxSuccess

fun PropertyContext.checkMaxSuccess(config: PropTestConfig, seed: Long): Unit

doStep

Performs shrinking on the given RTree. Recurses into the tree for failing cases.

suspend fun <A> doStep(tree: RTree<A>, mode: ShrinkingMode, tested: MutableSet<A>, counter: Counter, test: suspend (A) -> Unit, sb: StringBuilder): A?

proptest

suspend fun <A> proptest(iterations: Int, genA: Gen<A>, config: PropTestConfig, property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend fun <A, B> proptest(iterations: Int, genA: Gen<A>, genB: Gen<B>, config: PropTestConfig, property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend fun <A, B, C> proptest(iterations: Int, genA: Gen<A>, genB: Gen<B>, genC: Gen<C>, config: PropTestConfig, property: suspend PropertyContext.(A, B, C) -> Unit): PropertyContext
suspend fun <A, B, C, D> proptest(iterations: Int, genA: Gen<A>, genB: Gen<B>, genC: Gen<C>, genD: Gen<D>, config: PropTestConfig, property: suspend PropertyContext.(A, B, C, D) -> Unit): PropertyContext
suspend fun <A, B, C, D, E> proptest(iterations: Int, genA: Gen<A>, genB: Gen<B>, genC: Gen<C>, genD: Gen<D>, genE: Gen<E>, config: PropTestConfig, property: suspend PropertyContext.(A, B, C, D, E) -> Unit): PropertyContext
suspend fun <A, B, C, D, E, F> proptest(iterations: Int, genA: Gen<A>, genB: Gen<B>, genC: Gen<C>, genD: Gen<D>, genE: Gen<E>, genF: Gen<F>, config: PropTestConfig, property: suspend PropertyContext.(A, B, C, D, E, F) -> Unit): PropertyContext

shrinkfn

Returns a shrink function, which, when invoked, will shrink the inputs and attempt to return the smallest failing case.

fun <A> shrinkfn(a: Sample<A>, property: suspend PropertyContext.(A) -> Unit, shrinkingMode: ShrinkingMode): suspend () -> List<Any?>
fun <A, B> shrinkfn(a: Sample<A>, b: Sample<B>, property: suspend PropertyContext.(A, B) -> Unit, shrinkingMode: ShrinkingMode): suspend () -> List<Any?>
fun <A, B, C> shrinkfn(a: Sample<A>, b: Sample<B>, c: Sample<C>, property: suspend PropertyContext.(A, B, C) -> Unit, shrinkingMode: ShrinkingMode): suspend () -> List<Any?>
fun <A, B, C, D> shrinkfn(a: Sample<A>, b: Sample<B>, c: Sample<C>, d: Sample<D>, property: suspend PropertyContext.(A, B, C, D) -> Unit, shrinkingMode: ShrinkingMode): suspend () -> List<Any?>
fun <A, B, C, D, E> shrinkfn(a: Sample<A>, b: Sample<B>, c: Sample<C>, d: Sample<D>, e: Sample<E>, property: suspend PropertyContext.(A, B, C, D, E) -> Unit, shrinkingMode: ShrinkingMode): suspend () -> List<Any?>
fun <A, B, C, D, E, F> shrinkfn(a: Sample<A>, b: Sample<B>, c: Sample<C>, d: Sample<D>, e: Sample<E>, f: Sample<F>, property: suspend PropertyContext.(A, B, C, D, E, F) -> Unit, shrinkingMode: ShrinkingMode): suspend () -> List<Any?>