kotest-property
Module Contents
alltypes
package io.kotest.property
Module Contents
suspend fun <A> checkAll(genA: Gen<A>, property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend fun <A> checkAll(iterations: Int, genA: Gen<A>, property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend fun <A> checkAll(config: PropTestConfig, genA: Gen<A>, property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend fun <A> checkAll(iterations: Int, config: PropTestConfig, genA: Gen<A>, property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend inline fun <reified A> checkAll(noinline property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend inline fun <reified A> checkAll(iterations: Int, noinline property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend inline fun <reified A> checkAll(config: PropTestConfig, noinline property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend inline fun <reified A> checkAll(iterations: Int, config: PropTestConfig, noinline property: suspend PropertyContext.(A) -> Unit): PropertyContext
suspend fun <A, B> checkAll(genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend fun <A, B> checkAll(config: PropTestConfig, genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend fun <A, B> checkAll(iterations: Int, genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend fun <A, B> checkAll(iterations: Int, config: PropTestConfig, genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend inline fun <reified A, reified B> checkAll(noinline property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend inline fun <reified A, reified B> checkAll(config: PropTestConfig, noinline property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend inline fun <reified A, reified B> checkAll(iterations: Int, noinline property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend inline fun <reified A, reified B> checkAll(iterations: Int, config: PropTestConfig, noinline property: suspend PropertyContext.(A, B) -> Unit): PropertyContext
suspend fun <A> forAll(genA: Gen<A>, property: PropertyContext.(A) -> Boolean): PropertyContext
suspend fun <A> forAll(iterations: Int, genA: Gen<A>, property: PropertyContext.(A) -> Boolean): PropertyContext
suspend fun <A> forAll(config: PropTestConfig, genA: Gen<A>, property: PropertyContext.(A) -> Boolean): PropertyContext
suspend fun <A> forAll(iterations: Int, config: PropTestConfig, genA: Gen<A>, property: PropertyContext.(A) -> Boolean): PropertyContext
suspend inline fun <reified A> forAll(crossinline property: suspend PropertyContext.(A) -> Boolean): PropertyContext
suspend inline fun <reified A> forAll(iterations: Int, crossinline property: suspend PropertyContext.(A) -> Boolean): PropertyContext
suspend inline fun <reified A> forAll(config: PropTestConfig, crossinline property: suspend PropertyContext.(A) -> Boolean): PropertyContext
suspend inline fun <reified A> forAll(iterations: Int, config: PropTestConfig, crossinline property: suspend PropertyContext.(A) -> Boolean): PropertyContext
suspend fun <A, B> forAll(genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Boolean): PropertyContext
suspend fun <A, B> forAll(config: PropTestConfig = PropTestConfig(), genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Boolean): PropertyContext
suspend fun <A, B> forAll(iterations: Int, genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Boolean): PropertyContext
suspend fun <A, B> forAll(iterations: Int, config: PropTestConfig, genA: Gen<A>, genB: Gen<B>, property: suspend PropertyContext.(A, B) -> Boolean): PropertyContext
suspend inline fun <reified A, reified B> forAll(crossinline property: PropertyContext.(A, B) -> Boolean): PropertyContext
suspend inline fun <reified A, reified B> forAll(config: PropTestConfig = PropTestConfig(), crossinline property: PropertyContext.(A, B) -> Boolean): PropertyContext
suspend inline fun <reified A, reified B> forAll(iterations: Int, crossinline property: PropertyContext.(A, B) -> Boolean): PropertyContext
suspend inline fun <reified A, reified B> forAll(iterations: Int, config: PropTestConfig, crossinline property: PropertyContext.(A, B) -> Boolean): PropertyContext
interface Gen<out A>
kotlin.Long
kotlin.random.Random
fun <A, B> RTree<A>.map(f: (A) -> B): RTree<B>
fun <A, B : A> Gen<A>.merge(other: Gen<B>): Gen<A>
class PropertyContext
object PropertyTesting
data class PropTestConfig
data class RandomSource
fun <A> Shrinker<A>.rtree(a: A): RTree<A>
data class RTree<out A>
data class Sample<out A>
fun <A> sampleOf(a: A, shrinker: Shrinker<A>): Sample<A>
interface Shrinker<A>
sealed class ShrinkingMode
package io.kotest.property.arbitrary
Module Contents
interface Arb<A> : Gen<A>
fun <A> arb(edgecases: List<A> = emptyList(), f: (RandomSource) -> A): Arb<A>
fun <A> arb(shrinker: Shrinker<A>, f: (RandomSource) -> A): Arb<A>
fun <A> arb(shrinker: Shrinker<A>, edgecases: List<A> = emptyList(), f: (RandomSource) -> A): Arb<A>
interface BasicArb<A> : Arb<A>
fun Arb.Companion.bigInt(range: IntRange): Arb<BigInteger>
fun <A, B> Shrinker<A>.bimap(f: (B) -> A, g: (A) -> B): Shrinker<B>
fun <A, T> Arb.Companion.bind(arbA: Arb<A>, createFn: (A) -> T): Arb<T>
fun <A, B, T> Arb.Companion.bind(arbA: Arb<A>, arbB: Arb<B>, createFn: (A, B) -> T): Arb<T>
fun <A, B, C, T> Arb.Companion.bind(arbA: Arb<A>, arbB: Arb<B>, arbC: Arb<C>, createFn: (A, B, C) -> T): Arb<T>
fun <A, B, C, D, T> Arb.Companion.bind(arbA: Arb<A>, arbB: Arb<B>, arbC: Arb<C>, arbD: Arb<D>, createFn: (A, B, C, D) -> T): Arb<T>
fun <A, B, C, D, E, T> Arb.Companion.bind(arbA: Arb<A>, arbB: Arb<B>, arbC: Arb<C>, arbD: Arb<D>, arbE: Arb<E>, createFn: (A, B, C, D, E) -> T): Arb<T>
fun <A, B, C, D, E, F, T> Arb.Companion.bind(arbA: Arb<A>, arbB: Arb<B>, arbC: Arb<C>, arbD: Arb<D>, arbE: Arb<E>, arbF: Arb<F>, createFn: (A, B, C, D, E, F) -> T): Arb<T>
fun <A, B, C, D, E, F, G, T> Arb.Companion.bind(arbA: Arb<A>, arbB: Arb<B>, arbC: Arb<C>, arbD: Arb<D>, arbE: Arb<E>, arbF: Arb<F>, arbG: Arb<G>, createFn: (A, B, C, D, E, F, G) -> T): Arb<T>
fun Arb.Companion.bool(): Arb<Boolean>
fun Arb.Companion.byte(): Arb<Byte>
val ByteShrinker: Shrinker<Byte>
fun Arb.Companion.char(range: CharRange, vararg ranges: CharRange): Arb<Char>
fun Arb.Companion.char(ranges: List<CharRange> = CharSets.BASIC_LATIN): Arb<Char>
fun <A> Arb.Companion.choice(vararg gens: Gen<A>): Arb<A>
fun <A : Any> Arb.Companion.choose(a: Pair<Int, A>, b: Pair<Int, A>, vararg cs: Pair<Int, A>): Arb<A>
fun <A> Arb.Companion.constant(a: A): Arb<A>
fun <A> Arb.Companion.create(fn: (RandomSource) -> A): Arb<A>
fun Arb.Companion.date(minYear: Int = 1970, maxYear: Int = 2030): <ERROR CLASS>
fun Arb.Companion.date(yearRange: IntRange): <ERROR CLASS>
fun Arb.Companion.datetime(minYear: Int = 1970, maxYear: Int = 2030): <ERROR CLASS>
fun Arb.Companion.datetime(yearRange: IntRange): <ERROR CLASS>
fun <reified A> Arb.Companion.default(): Arb<A>
fun <A> defaultForClass(kClass: KClass<*>): Arb<A>?
fun <A> Arb<A>.distinct(): Arb<A>
fun Arb.Companion.double(): Arb<Double>
object DoubleShrinker : Shrinker<Double>
fun <T> Arb.Companion.element(collection: Collection<T>): Arb<T>
fun Arb.Companion.email(usernameSize: IntRange = 3..10, domainSize: IntRange = 3..10): Arb<String>
fun <reified T : Enum<T>> Arb.Companion.enum(): Arb<T>
fun Arb.Companion.factors(k: Int): Arb<Int>
fun Arb.Companion.file(): Arb<File>
fun Arb.Companion.file(directoryName: String, recursive: Boolean = false): Arb<File>
fun <A> Arb<A>.filter(predicate: (A) -> Boolean): Arb<A>
fun <A, reified B : A> Arb<A>.filterIsInstance(): Arb<B>
fun <A> Arb<A>.filterNot(f: (A) -> Boolean): Arb<A>
fun <A, B> Arb<A>.flatMap(f: (A) -> Arb<B>): Arb<B>
fun Arb.Companion.float(): Arb<Float>
object FloatShrinker : Shrinker<Float>
fun <reified A> Arb.Companion.forClass(kClass: KClass<*>): Arb<A>
fun Arb.Companion.int(min: Int, max: Int): Arb<Int>
fun Arb.Companion.int(range: IntRange = Int.MIN_VALUE..Int.MAX_VALUE): Arb<Int>
object IntShrinker : Shrinker<Int>
fun Arb.Companion.lines(file: File, charset: Charset = Charsets.UTF_8): Arb<String>
@JvmOverloads fun <A> Arb.Companion.list(gen: Gen<A>, range: IntRange = 0..100): Arb<List<A>>
class ListShrinker<A> : Shrinker<List<A>>
fun Arb.Companion.localDate(minYear: Int = 1970, maxYear: Int = 2030): Arb<LocalDate>
fun Arb.Companion.localDateTime(minYear: Int = 1970, maxYear: Int = 2030): Arb<LocalDateTime>
fun Arb.Companion.localTime(): Arb<LocalTime>
fun Arb.Companion.long(min: Long = Long.MIN_VALUE, max: Long = Long.MAX_VALUE): Arb<Long>
fun Arb.Companion.long(range: LongRange = Long.MIN_VALUE..Long.MAX_VALUE): Arb<Long>
object LongShrinker : Shrinker<Long>
fun <A, B> Arb<A>.map(f: (A) -> B): Arb<B>
fun <K, V> Arb.Companion.map(arb: Arb<Pair<K, V>>, minSize: Int = 1, maxSize: Int = 100): Arb<Map<K, V>>
fun <K, V> Arb.Companion.map(keyArb: Arb<K>, valueArb: Arb<V>, minSize: Int = 1, maxSize: Int = 100): Arb<Map<K, V>>
class MapShrinker<K, V> : Shrinker<Map<K, V>>
fun Arb.Companion.multiples(k: Int, max: Int): Arb<Int>
class MultiplesShrinker : Shrinker<Int>
fun Arb.Companion.nats(max: Int = Int.MAX_VALUE): Arb<Int>
fun Arb.Companion.negativeDoubles(): Arb<Double>
fun Arb.Companion.negativeInts(min: Int = Int.MIN_VALUE): Arb<Int>
fun <A> Arb<A>.next(rs: RandomSource = RandomSource.Default): A
fun <A> Arb<A>.next(predicate: (A) -> Boolean = { true }, random: RandomSource?): A
fun Arb.Companion.numericDoubles(from: Double = Double.MIN_VALUE, to: Double = Double.MAX_VALUE): Arb<Double>
fun Arb.Companion.numericFloats(from: Float = Float.MIN_VALUE, to: Float = Float.MAX_VALUE): Arb<Float>
fun <K, V> Arb.Companion.pair(k: Arb<K>, v: Arb<V>): Arb<Pair<K, V>>
fun Arb.Companion.period(maxYear: Int = 10): Arb<Period>
fun Arb.Companion.positiveDoubles(): Arb<Double>
fun Arb.Companion.positiveInts(max: Int = Int.MAX_VALUE): Arb<Int>
fun Arb.Companion.regex(regex: String): Arb<String!>
fun Arb.Companion.regex(regex: Regex): Arb<String!>
@JvmOverloads fun <A> Arb.Companion.set(gen: Gen<A>, range: IntRange = 0..100): Arb<Set<A>>
fun Arb.Companion.short(): Arb<Short>
val ShortShrinker: Shrinker<Short>
fun <A> Arb.Companion.shuffle(list: List<A>): Arb<List<A>>
fun <A> Arb<A>.single(rs: RandomSource = RandomSource.Default): A
fun Arb.Companion.string(minSize: Int = 0, maxSize: Int = 100): Arb<String>
fun Arb.Companion.string(range: IntRange): Arb<String>
object StringShrinker : Shrinker<String>
fun <A> Arb.Companion.subsequence(list: List<A>): Arb<List<A>>
fun <A> Arb<A>.take(count: Int, rs: RandomSource = RandomSource.Default): Sequence<A>
fun <reified A> targetDefaultForClass(): Arb<A>?
fun <A, B, C> Arb.Companion.triple(arbA: Arb<A>, arbB: Arb<B>, arbC: Arb<C>): Arb<Triple<A, B, C>>
abstract class TypeReference<T> : Comparable<TypeReference<T>>
@ExperimentalUnsignedTypes fun Arb.Companion.ushort(): Arb<UShort>
val UShortShrinker: Shrinker<UShort>
fun Arb.Companion.uuid(uuidVersion: UUIDVersion = UUIDVersion.V4, allowNilValue: Boolean = true): Arb<UUID>
package io.kotest.property.exhaustive
package io.kotest.property.internal
Module Contents
fun PropertyContext.checkMaxSuccess(config: PropTestConfig, seed: Long): Unit
class Counter
data class PropertyFailureInput<T>
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
typealias ShrinkFn = suspend () -> List<Any?>
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