BigIntegerGen |
class BigIntegerGen : Gen<BigInteger> |
Gen |
A Generator, or Gen is responsible for generating data to be used in property testing. Each generator will generate data for a specific type . interface |
PropertyContext |
A PropertyContext is used when executing a propery test. It allows feedback and tracking of the state of the property test. class |
PropertyFailureInput |
data class |
PropertyTesting |
object |
RegexpGen |
class RegexpGen : Gen<String> |
Tuple4 |
data class |
Tuple5 |
data class |
Tuple6 |
data class |
TypeReference |
abstract class TypeReference<T> : Comparable<TypeReference<T>> |
UUIDVersion |
enum class UUIDVersion |
kotlin.random.Random |
|
kotlin.reflect.KFunction1 |
|
kotlin.reflect.KFunction2 |
_assertAll |
fun <A> fun <A, B> |
assertAll |
fun <A> fun <A> fun <A> fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> fun <A, B> fun <A, B> fun <A, B> fun <A, B> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C> assertAll(iterations: Int, gena: Gen<A>, genb: Gen<B>, genc: Gen<C>, fn: PropertyContext.(a: A, b: B, c: C) -> Unit): Unitfun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> |
assertNone |
fun <A> fun <A> fun <A> fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> fun <A, B> fun <A, B> fun <A, B> fun <A, B> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> |
filterIsInstance |
Create a new Gen by keeping only instances of U generated by this gen. This is useful if you have a type hierarchy and only want to retain a particular subtype. fun <T, U : T> Gen<T>. |
forAll |
fun <A> fun <A> fun <A> fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> fun <A, B> fun <A, B> fun <A, B> fun <A, B> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> |
forClassName |
fun forClassName(className: String): Gen<*> |
forNone |
fun <A> fun <A> fun <A> fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> fun <A, B> fun <A, B> fun <A, B> fun <A, B> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> |
generateInfiniteSequence |
Create a infinite sequence of the given generator fun <T> |
next |
Draws a random value from this generator fun <T> Gen<T>.fun <T> Gen<T>. |
outputClassifications |
fun outputClassifications(context: PropertyContext): Unit |
outputValues |
fun outputValues(context: PropertyContext): Unit |
propertyTestFailureMessage |
fun |
take |
Draws amount values from this generator fun <T> Gen<T>. |
testAndShrink |
fun <A> fun <A, B> fun <A, B, C> fun <A, B, C, D> fun <A, B, C, D, E> |
uniqueRandoms |
Creates a sequence of unique values from the contents of random, using seed to seed the random function. fun <T> Gen<T>. |
verifyAll |
fun <A> fun <A> fun <A> fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> fun <A, B> fun <A, B> fun <A, B> fun <A, B> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> |
verifyNone |
fun <A> fun <A> fun <A> fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> Gen<A>.fun <A> fun <A, B> fun <A, B> fun <A, B> fun <A, B> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> fun <A, B, C, D, E, F> |
bigInteger |
fun Gen.Companion. |
bind |
fun <A, T> Gen.Companion.fun <A, B, T> Gen.Companion.fun <A, B, C, T> Gen.Companion.fun <A, B, C, D, T> Gen.Companion.fun <A, B, C, D, E, T> Gen.Companion.fun <A, B, C, D, E, F, T> Gen.Companion.fun <A, B, C, D, E, F, G, T> Gen.Companion. |
bool |
Returns both boolean values fun Gen.Companion. |
byte |
Returns a stream of values where each value is a randomly chosen Byte. The values always returned include the following edge cases: [Byte.MIN_VALUE, Byte.MAX_VALUE, 0] fun Gen.Companion. |
char |
Returns a stream of randomly-chosen Chars. Custom characters can be generated by providing CharRanges. Distribution will be even across the ranges of Chars. For example: Gen.char('A'..'C', 'D'..'E') Ths will choose A, B, C, D, and E each 20% of the time. fun Gen.Companion.
Returns a stream of randomly-chosen Chars. Custom characters can be generated by providing a list of CharRanges. Distribution will be even across the ranges of Chars. For example: Gen.char(listOf('A'..'C', 'D'..'E') Ths will choose A, B, C, D, and E each 20% of the time. fun Gen.Companion. |
choose |
Returns a stream of values, where each value is a random Int between the given min and max. fun Gen.Companion.
Returns a stream of values, where each value is a Long between the given min and max. fun Gen.Companion.
Returns a stream of values based on weights: fun <T : Any> Gen.Companion. |
constant |
Returns a [Gen] which always returns the same value. fun <T> Gen.Companion. |
create |
Returns a stream of values, where each value is generated from the given function fun <T> Gen.Companion. |
default |
fun <T> Gen.Companion. |
double |
Returns a stream of values where each value is a randomly chosen Double. fun Gen.Companion. |
duration |
Generates a stream of random Durations fun Gen.Companion. |
enum |
fun <T : Enum<T>> Gen.Companion. |
factors |
fun Gen.Companion. |
file |
Returns a stream of values where each value is a randomly chosen created File object. The file objects do not necessarily exist on disk. fun Gen.Companion.
Returns a stream of values where each value is a randomly chosen File object from given directory. If the Directory does not exist, an empty sequence will be returned instead. If recursive is true(default value is false) it gives files from inner directories as well recursively. fun Gen.Companion. |
float |
Returns a stream of values where each value is a randomly chosen Float. fun Gen.Companion. |
forClassName |
fun Gen.Companion.forClassName(className: String): Gen<*> |
from |
Adapts a list into a generator, where random values will be picked. May not choose every item in the list. fun <T> Gen.Companion.fun <T> Gen.Companion. |
int |
Returns a stream of values where each value is a randomly chosen Int. The values always returned include the following edge cases: [Int.MIN_VALUE, Int.MAX_VALUE, 0, 1, -1] fun Gen.Companion. |
list |
Returns a stream of values, where each value is a list of values generated by the underlying generator. fun <T> Gen.Companion. |
localDate |
Generates a stream of random LocalDates fun Gen.Companion. |
localDateTime |
Generates a stream of random LocalDateTimes fun Gen.Companion. |
localTime |
Generates a stream of random LocalTimes fun Gen.Companion. |
long |
Returns a stream of values where each value is a randomly chosen long. The values returned always include the following edge cases: [Long.MIN_VALUE, Long.MAX_VALUE, 0, 1, -1] fun Gen.Companion. |
map |
Returns a stream of values, where each value is a Map, which contains keys and values generated from the underlying generators. fun <K, V> Gen.Companion.fun <K, V> Gen.Companion. |
multiples |
fun Gen.Companion. |
nats |
Returns a stream of values where each value is a randomly chosen natural number. The values returned always include the following edge cases: Int.MAX_VALUE fun Gen.Companion. |
negativeDoubles |
fun Gen.Companion. |
negativeIntegers |
Returns a stream of values where each value is a randomly chosen negative value. The values returned always include the following edge cases: Int.MIN_VALUE fun Gen.Companion. |
numericDoubles |
Returns a Gen which is the same as Gen.double but does not include +INFINITY, -INFINITY or NaN. fun Gen.Companion. |
numericFloats |
Returns a Gen which is the same as Gen.float but does not include +INFINITY, -INFINITY or NaN. fun Gen.Companion. |
oneOf |
fun <A> Gen.Companion.oneOf(vararg gens: Gen<out A>): Gen<A> |
pair |
Returns a stream of values, where each value is a pair generated by the underlying generators. fun <K, V> Gen.Companion. |
period |
Generates a stream of random Periods fun Gen.Companion. |
positiveDoubles |
fun Gen.Companion. |
positiveIntegers |
Returns a stream of values where each value is a randomly chosen positive value. The values returned always include the following edge cases: Int.MAX_VALUE fun Gen.Companion. |
regex |
fun Gen.Companion.fun Gen.Companion. |
samples |
Returns a Gen which returns the sample values in the same order as they are passed in, once all sample values are used it repeats elements from start. fun <T> Gen.Companion. |
set |
Returns a stream of values, where each value is a set of values generated by the given generator. fun <T> Gen.Companion. |
short |
Returns a stream of values where each value is a randomly chosen Short. The values always returned include the following edge cases: [Short.MIN_VALUE, Short.MAX_VALUE, 0] fun Gen.Companion. |
string |
Returns a stream of values where each value is a random printed string. fun Gen.Companion. |
triple |
Returns a [Gen] where each value is a [Triple] generated by a value from each of three supplied generators. fun <A, B, C> Gen.Companion. |
ubyte |
Returns a stream of values where each value is a randomly chosen UByte. The values always returned include the following edge cases: [UByte.MIN_VALUE, UByte.MAX_VALUE] fun Gen.Companion.ubyte(): Gen<Byte> |
uint |
Returns a stream of values where each value is a randomly chosen UInt. The values always returned include the following edge cases: [UInt.MIN_VALUE, UInt.MAX_VALUE] fun Gen.Companion.uint(): Gen<UInt> |
ulong |
Returns a stream of values where each value is a randomly chosen ULong. The values returned always include the following edge cases: [ULong.MIN_VALUE, ULong.MAX_VALUE] fun Gen.Companion.ulong(): Gen<ULong> |
ushort |
Returns a stream of values where each value is a randomly chosen UShort. The values always returned include the following edge cases: [UShort.MIN_VALUE, UShort.MAX_VALUE] fun Gen.Companion. |
uuid |
fun Gen.Companion. |