IntRangeArbitrary

data class IntRangeArbitrary(min: Int, max: Int, minSize: Int, maxSize: Int) : ArbitraryDecorator<IntRange> , SizableArbitrary<IntRange>

Constructors

Link copied to clipboard
constructor(min: Int, max: Int, minSize: Int, maxSize: Int)
constructor()

Properties

Link copied to clipboard
open override val isGeneratorMemoizable: Boolean

Functions

Link copied to clipboard
Link copied to clipboard
open fun <A : Any?> array(arrayClass: Class<A?>?): ArrayArbitrary<IntRange?, A?>?
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
inline fun <T, A : Any> Arbitrary<T>.array(): ArrayArbitrary<T, A>

Create a new arbitrary of type Array using the existing arbitrary for generating the elements of the array.

Link copied to clipboard
@API(status = API.Status.INTERNAL)
open fun asGeneric(): Arbitrary<Any?>?
Link copied to clipboard
fun between(min: Int, max: Int): IntRangeArbitrary
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun collect(until: Predicate<in List<out IntRange?>?>?): Arbitrary<List<IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.4.0")
open fun dontShrink(): Arbitrary<IntRange?>?
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.3.0")
open fun edgeCases(): EdgeCases<IntRange?>?
@API(status = API.Status.MAINTAINED, since = "1.8.0")
open fun edgeCases(configurator: Consumer<EdgeCases.Config<IntRange?>?>?): Arbitrary<IntRange?>?
open fun edgeCases(maxEdgeCases: Int): EdgeCases<IntRange?>?
Link copied to clipboard
@API(status = API.Status.INTERNAL)
open fun exhaustive(): Optional<ExhaustiveGenerator<IntRange?>?>?
open fun exhaustive(maxNumberOfSamples: Long): Optional<ExhaustiveGenerator<IntRange?>?>?
Link copied to clipboard
open fun filter(filterPredicate: Predicate<in IntRange?>?): Arbitrary<IntRange?>?
@API(status = API.Status.EXPERIMENTAL, since = "1.7.0")
open fun filter(maxMisses: Int, filterPredicate: Predicate<in IntRange?>?): Arbitrary<IntRange?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.2.0")
open fun fixGenSize(genSize: Int): Arbitrary<IntRange?>?
Link copied to clipboard
open fun <U> flatMap(mapper: Function<in IntRange?, out Arbitrary<U?>?>?): Arbitrary<U?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.1.2")
open fun forEachValue(action: Consumer<in IntRange?>?)
Link copied to clipboard
open fun generator(genSize: Int): RandomGenerator<IntRange?>?
@API(status = API.Status.INTERNAL, since = "1.4.0")
open fun generator(genSize: Int, withEdgeCases: Boolean): RandomGenerator<IntRange?>?
Link copied to clipboard
open fun generatorWithEmbeddedEdgeCases(genSize: Int): RandomGenerator<IntRange?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.1")
open fun ignoreException(exceptionType: Class<out Throwable?>?): Arbitrary<IntRange?>?
@API(status = API.Status.EXPERIMENTAL, since = "1.7.3")
open fun ignoreException(maxThrows: Int, exceptionType: Class<out Throwable?>?): Arbitrary<IntRange?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.7.2")
open fun ignoreExceptions(vararg exceptionTypes: Class<out Throwable?>?): Arbitrary<IntRange?>?
@API(status = API.Status.EXPERIMENTAL, since = "1.7.3")
open fun ignoreExceptions(maxThrows: Int, vararg exceptionTypes: Class<out Throwable?>?): Arbitrary<IntRange?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun injectDuplicates(duplicateProbability: Double): Arbitrary<IntRange?>?
Link copied to clipboard
open fun injectNull(nullProbability: Double): Arbitrary<@Nullable IntRange?>?
Link copied to clipboard
Link copied to clipboard
open operator fun iterator(): IteratorArbitrary<IntRange?>?
Link copied to clipboard
open fun list(): ListArbitrary<IntRange?>?
Link copied to clipboard
open fun <U> map(mapper: Function<in IntRange?, out U?>?): Arbitrary<U?>?
Link copied to clipboard
open override fun ofMaxSize(maxSize: Int): IntRangeArbitrary

Set upper size boundary maxSize (included).

Link copied to clipboard
open override fun ofMinSize(minSize: Int): IntRangeArbitrary

Set lower size boundary minSize (included).

Link copied to clipboard
open override fun ofSize(size: Int): IntRangeArbitrary

Fix the size (the difference between first and last value of a range).

Set min and max size (the difference between first and last value of a range).

Link copied to clipboard
open fun optional(): Arbitrary<Optional<IntRange?>?>?
@API(status = API.Status.MAINTAINED, since = "1.5.4")
open fun optional(presenceProbability: Double): Arbitrary<Optional<IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T> Arbitrary<T>.orNull(nullProbability: Double): Arbitrary<T?>

Create a new arbitrary of the same type but inject null values with a probability of nullProbability.

Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T> Arbitrary<T>.pair(): Arbitrary<Pair<T, T>>

Create a new arbitrary for type Pair using the existing arbitrary for generating the elements of the pair.

Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun sample(): IntRange?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun sampleStream(): Stream<IntRange?>?
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T> Arbitrary<T>.sequence(): SequenceArbitrary<T>

Create a new arbitrary of type SequenceArbitrary using the existing arbitrary for generating the elements of the sequence.

Link copied to clipboard
open fun set(): SetArbitrary<IntRange?>?
Link copied to clipboard
open fun stream(): StreamArbitrary<IntRange?>?
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun <T> Arbitrary<T>.triple(): Arbitrary<Triple<T, T, T>>

Create a new arbitrary for type Triple using the existing arbitrary for generating the elements of the triple.

Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple1(): Arbitrary<Tuple.Tuple1<IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple2(): Arbitrary<Tuple.Tuple2<IntRange?, IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple3(): Arbitrary<Tuple.Tuple3<IntRange?, IntRange?, IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple4(): Arbitrary<Tuple.Tuple4<IntRange?, IntRange?, IntRange?, IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.3")
open fun tuple5(): Arbitrary<Tuple.Tuple5<IntRange?, IntRange?, IntRange?, IntRange?, IntRange?>?>?
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.8.0")
open fun withoutEdgeCases(): Arbitrary<IntRange?>?
Link copied to clipboard
open override fun withSizeDistribution(distribution: RandomDistribution): SizableArbitrary<IntRange>