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>

ShrinkFn

typealias ShrinkFn = suspend () -> List<Any?>

Functions

checkMaxSuccess

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

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

shrinkfn

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

fun <A> shrinkfn(a: Sample<A>, property: suspend PropertyContext.(A) -> Unit, shrinkingMode: ShrinkingMode): ShrinkFn
fun <A, B> shrinkfn(a: Sample<A>, b: Sample<B>, property: suspend PropertyContext.(A, B) -> Unit, shrinkingMode: ShrinkingMode): ShrinkFn
fun <A, B, C> shrinkfn(a: Sample<A>, b: Sample<B>, c: Sample<C>, property: suspend PropertyContext.(A, B, C) -> Unit, shrinkingMode: ShrinkingMode): ShrinkFn