main.net.jqwik.kotlin.api.SizableArbitraryExtensions.kt Maven / Gradle / Ivy
package net.jqwik.kotlin.api
import net.jqwik.api.arbitraries.*
import org.apiguardian.api.API
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun ListArbitrary.ofSize(range: IntRange): ListArbitrary = ofMinSize(range.first).ofMaxSize(range.last)
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun SetArbitrary.ofSize(range: IntRange): SetArbitrary = ofMinSize(range.first).ofMaxSize(range.last)
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun StreamArbitrary.ofSize(range: IntRange): StreamArbitrary = ofMinSize(range.first).ofMaxSize(range.last)
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun IteratorArbitrary.ofSize(range: IntRange): IteratorArbitrary = ofMinSize(range.first).ofMaxSize(range.last)
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun MapArbitrary.ofSize(range: IntRange): MapArbitrary = ofMinSize(range.first).ofMaxSize(range.last)
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun ArrayArbitrary.ofSize(range: IntRange): ArrayArbitrary = ofMinSize(range.first).ofMaxSize(range.last)