Gen

object Gen extends GenZIO with FunctionVariants with TimeVariants
Companion:
class
trait Product
trait Mirror
trait GenZIO
class Object
trait Matchable
class Any
Gen.type

Type members

Inherited types

The names of the product elements

The names of the product elements

Inherited from:
Mirror

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

A generator of alphanumeric strings whose size falls within the specified bounds.

A generator of alphanumeric strings whose size falls within the specified bounds.

A generator of US-ASCII characters. Shrinks toward '0'.

A generator of US-ASCII characters. Shrinks toward '0'.

A generator US-ASCII strings. Shrinks towards the empty string.

A generator US-ASCII strings. Shrinks towards the empty string.

A generator of strings. Shrinks towards the empty string.

A generator of strings. Shrinks towards the empty string.

A generator of big decimals inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of big decimals inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

The values generated will have a precision equal to the precision of the difference between max and min.

A generator of java.math.BigDecimal inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of java.math.BigDecimal inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

See also:

See bigDecimal for implementation.

def bigInt(min: BigInt, max: BigInt): Gen[Random, BigInt]

A generator of big integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of big integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of java.math.BigInteger inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of java.math.BigInteger inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

See also:

See bigInt for implementation.

def bounded[R <: Random, A](min: Int, max: Int)(f: Int => Gen[R, A]): Gen[R, A]

A generator whose size falls within the specified bounds.

A generator whose size falls within the specified bounds.

def byte(min: Byte, max: Byte): Gen[Random, Byte]

A generator of byte values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of byte values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

def char(min: Char, max: Char): Gen[Random, Char]

A generator of character values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of character values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

def chunkOf[R <: Random & Sized, A](g: Gen[R, A]): Gen[R, Chunk[A]]

A sized generator of chunks.

A sized generator of chunks.

def chunkOf1[R <: Random & Sized, A](g: Gen[R, A]): Gen[R, NonEmptyChunk[A]]

A sized generator of non-empty chunks.

A sized generator of non-empty chunks.

def chunkOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, Chunk[A]]

A generator of chunks whose size falls within the specified bounds.

A generator of chunks whose size falls within the specified bounds.

def chunkOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, Chunk[A]]

A generator of chunks of the specified size.

A generator of chunks of the specified size.

def concatAll[R, A](gens: => Iterable[Gen[R, A]]): Gen[R, A]

Combines the specified deterministic generators to return a new deterministic generator that generates all of the values generated by the specified generators.

Combines the specified deterministic generators to return a new deterministic generator that generates all of the values generated by the specified generators.

def const[A](a: => A): Gen[Any, A]

A constant generator of the specified value.

A constant generator of the specified value.

def constSample[R, A](sample: => Sample[R, A]): Gen[R, A]

A constant generator of the specified sample.

A constant generator of the specified sample.

def crossAll[R, A](gens: Iterable[Gen[R, A]]): Gen[R, List[A]]

Composes the specified generators to create a cartesian product of elements with the specified function.

Composes the specified generators to create a cartesian product of elements with the specified function.

def crossN[R, A, B, C](gen1: Gen[R, A], gen2: Gen[R, B])(f: (A, B) => C): Gen[R, C]

Composes the specified generators to create a cartesian product of elements with the specified function.

Composes the specified generators to create a cartesian product of elements with the specified function.

def crossN[R, A, B, C, D](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C])(f: (A, B, C) => D): Gen[R, D]

Composes the specified generators to create a cartesian product of elements with the specified function.

Composes the specified generators to create a cartesian product of elements with the specified function.

def crossN[R, A, B, C, D, F](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D])(f: (A, B, C, D) => F): Gen[R, F]

Composes the specified generators to create a cartesian product of elements with the specified function.

Composes the specified generators to create a cartesian product of elements with the specified function.

def double(min: Double, max: Double): Gen[Random, Double]

A generator of double values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of double values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

def either[R <: Random, A, B](left: Gen[R, A], right: Gen[R, B]): Gen[R, Either[A, B]]
def elements[A](as: A*): Gen[Random, A]
def fromEffect[R, A](effect: URIO[R, A]): Gen[R, A]

Constructs a generator from an effect that constructs a value.

Constructs a generator from an effect that constructs a value.

def fromEffectSample[R, A](effect: ZIO[R, Nothing, Sample[R, A]]): Gen[R, A]

Constructs a generator from an effect that constructs a sample.

Constructs a generator from an effect that constructs a sample.

def fromIterable[R, A](as: Iterable[A], shrinker: A => ZStream[R, Nothing, A]): Gen[R, A]

Constructs a deterministic generator that only generates the specified fixed values.

Constructs a deterministic generator that only generates the specified fixed values.

final def fromRandom[A](f: Service => UIO[A]): Gen[Random, A]

Constructs a generator from a function that uses randomness. The returned generator will not have any shrinking.

Constructs a generator from a function that uses randomness. The returned generator will not have any shrinking.

final def fromRandomSample[R <: Random, A](f: Service => UIO[Sample[R, A]]): Gen[R, A]

Constructs a generator from a function that uses randomness to produce a sample.

Constructs a generator from a function that uses randomness to produce a sample.

def int(min: Int, max: Int): Gen[Random, Int]

A generator of integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

def large[R <: Random & Sized, A](f: Int => Gen[R, A], min: Int): Gen[R, A]

A sized generator that uses a uniform distribution of size values. A large number of larger sizes will be generated.

A sized generator that uses a uniform distribution of size values. A large number of larger sizes will be generated.

def listOf[R <: Random & Sized, A](g: Gen[R, A]): Gen[R, List[A]]
def listOf1[R <: Random & Sized, A](g: Gen[R, A]): Gen[R, ::[A]]
def listOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, List[A]]

A generator of lists whose size falls within the specified bounds.

A generator of lists whose size falls within the specified bounds.

def listOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, List[A]]
def long(min: Long, max: Long): Gen[Random, Long]

A generator of long values in the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of long values in the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

def mapOf[R <: Random & Sized, A, B](key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

A sized generator of maps.

A sized generator of maps.

def mapOf1[R <: Random & Sized, A, B](key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

A sized generator of non-empty maps.

A sized generator of non-empty maps.

def mapOfBounded[R <: Random, A, B](min: Int, max: Int)(key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

A generator of maps whose size falls within the specified bounds.

A generator of maps whose size falls within the specified bounds.

def mapOfN[R <: Random, A, B](n: Int)(key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

A generator of maps of the specified size.

A generator of maps of the specified size.

def medium[R <: Random & Sized, A](f: Int => Gen[R, A], min: Int): Gen[R, A]

A sized generator that uses an exponential distribution of size values. The majority of sizes will be towards the lower end of the range but some larger sizes will be generated as well.

A sized generator that uses an exponential distribution of size values. The majority of sizes will be towards the lower end of the range but some larger sizes will be generated as well.

def oneOf[R <: Random, A](as: Gen[R, A]*): Gen[R, A]
def option[R <: Random, A](gen: Gen[R, A]): Gen[R, Option[A]]

A generator of optional values. Shrinks toward None.

A generator of optional values. Shrinks toward None.

def partialFunction[R <: Random, A, B](gen: Gen[R, B]): Gen[R, PartialFunction[A, B]]

Constructs a generator of partial functions from A to B given a generator of B values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value or both be outside the partial function's domain, if they have the same hashCode.

Constructs a generator of partial functions from A to B given a generator of B values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value or both be outside the partial function's domain, if they have the same hashCode.

def partialFunctionWith[R <: Random, A, B](gen: Gen[R, B])(hash: A => Int): Gen[R, PartialFunction[A, B]]

Constructs a generator of partial functions from A to B given a generator of B values and a hashing function for A values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value or both be outside the partial function's domain, if they have have the same hash. This is useful when A does not implement hashCode in a way that is consistent with equality.

Constructs a generator of partial functions from A to B given a generator of B values and a hashing function for A values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value or both be outside the partial function's domain, if they have have the same hash. This is useful when A does not implement hashCode in a way that is consistent with equality.

def setOf[R <: Random & Sized, A](gen: Gen[R, A]): Gen[R, Set[A]]

A sized generator of sets.

A sized generator of sets.

def setOf1[R <: Random & Sized, A](gen: Gen[R, A]): Gen[R, Set[A]]

A sized generator of non-empty sets.

A sized generator of non-empty sets.

def setOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, Set[A]]

A generator of sets whose size falls within the specified bounds.

A generator of sets whose size falls within the specified bounds.

def setOfN[R <: Random, A](n: Int)(gen: Gen[R, A]): Gen[R, Set[A]]

A generator of sets of the specified size.

A generator of sets of the specified size.

def short(min: Short, max: Short): Gen[Random, Short]

A generator of short values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

A generator of short values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

def size: Gen[Sized, Int]
def sized[R <: Sized, A](f: Int => Gen[R, A]): Gen[R, A]

A sized generator, whose size falls within the specified bounds.

A sized generator, whose size falls within the specified bounds.

def small[R <: Random & Sized, A](f: Int => Gen[R, A], min: Int): Gen[R, A]

A sized generator that uses an exponential distribution of size values. The values generated will be strongly concentrated towards the lower end of the range but a few larger values will still be generated.

A sized generator that uses an exponential distribution of size values. The values generated will be strongly concentrated towards the lower end of the range but a few larger values will still be generated.

def some[R, A](gen: Gen[R, A]): Gen[R, Option[A]]
def string[R <: Random & Sized](char: Gen[R, Char]): Gen[R, String]
def string1[R <: Random & Sized](char: Gen[R, Char]): Gen[R, String]
def stringBounded[R <: Random](min: Int, max: Int)(g: Gen[R, Char]): Gen[R, String]

A generator of strings whose size falls within the specified bounds.

A generator of strings whose size falls within the specified bounds.

def stringN[R <: Random](n: Int)(char: Gen[R, Char]): Gen[R, String]
def suspend[R, A](gen: => Gen[R, A]): Gen[R, A]

Lazily constructs a generator. This is useful to avoid infinite recursion when creating generators that refer to themselves.

Lazily constructs a generator. This is useful to avoid infinite recursion when creating generators that refer to themselves.

def unfoldGen[R <: Random & Sized, S, A](s: S)(f: S => Gen[R, (S, A)]): Gen[R, List[A]]

A sized generator of collections, where each collection is generated by repeatedly applying a function to an initial state.

A sized generator of collections, where each collection is generated by repeatedly applying a function to an initial state.

def unfoldGenN[R, S, A](n: Int)(s: S)(f: S => Gen[R, (S, A)]): Gen[R, List[A]]

A generator of collections of up to the specified size, where each collection is generated by repeatedly applying a function to an initial state.

A generator of collections of up to the specified size, where each collection is generated by repeatedly applying a function to an initial state.

A generator of uniformly distributed doubles between [0, 1]. The shrinker will shrink toward 0.

A generator of uniformly distributed doubles between [0, 1]. The shrinker will shrink toward 0.

def vectorOf[R <: Random & Sized, A](g: Gen[R, A]): Gen[R, Vector[A]]
def vectorOf1[R <: Random & Sized, A](g: Gen[R, A]): Gen[R, Vector[A]]
def vectorOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, Vector[A]]

A generator of vectors whose size falls within the specified bounds.

A generator of vectors whose size falls within the specified bounds.

def vectorOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, Vector[A]]
def weighted[R <: Random, A](gs: (Gen[R, A], Double)*): Gen[R, A]

A generator which chooses one of the given generators according to their weights. For example, the following generator will generate 90% true and 10% false values.

A generator which chooses one of the given generators according to their weights. For example, the following generator will generate 90% true and 10% false values.

val trueFalse = Gen.weighted((Gen.const(true), 9), (Gen.const(false), 1))
def zipAll[R, A](gens: Iterable[Gen[R, A]]): Gen[R, List[A]]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C](gen1: Gen[R, A], gen2: Gen[R, B])(f: (A, B) => C): Gen[R, C]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C])(f: (A, B, C) => D): Gen[R, D]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D])(f: (A, B, C, D) => F): Gen[R, F]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F, G](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F])(fn: (A, B, C, D, F) => G): Gen[R, G]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F, G, H](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G])(fn: (A, B, C, D, F, G) => H): Gen[R, H]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F, G, H, I](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H])(fn: (A, B, C, D, F, G, H) => I): Gen[R, I]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F, G, H, I, J](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H], gen8: Gen[R, I])(fn: (A, B, C, D, F, G, H, I) => J): Gen[R, J]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F, G, H, I, J, K](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H], gen8: Gen[R, I], gen9: Gen[R, J])(fn: (A, B, C, D, F, G, H, I, J) => K): Gen[R, K]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

def zipN[R, A, B, C, D, F, G, H, I, J, K, L](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H], gen8: Gen[R, I], gen9: Gen[R, J], gen10: Gen[R, K])(fn: (A, B, C, D, F, G, H, I, J, K) => L): Gen[R, L]

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Inherited methods

A generator of java.time.DayOfWeek values. Shrinks toward DayOfWeek.MONDAY.

A generator of java.time.DayOfWeek values. Shrinks toward DayOfWeek.MONDAY.

Inherited from:
TimeVariants

A generator of finite zio.duration.Duration values. Shrinks toward Duration.Zero.

A generator of finite zio.duration.Duration values. Shrinks toward Duration.Zero.

Inherited from:
TimeVariants

A generator of java.time.Instant values. Shrinks toward Instant.MIN.

A generator of java.time.Instant values. Shrinks toward Instant.MIN.

Inherited from:
TimeVariants

A generator of java.time.LocalDate values. Shrinks toward LocalDate.MIN.

A generator of java.time.LocalDate values. Shrinks toward LocalDate.MIN.

Inherited from:
TimeVariants

A generator of java.time.LocalDateTime values. Shrinks toward LocalDateTime.MIN.

A generator of java.time.LocalDateTime values. Shrinks toward LocalDateTime.MIN.

Inherited from:
TimeVariants

A generator of java.time.LocalTime values. Shrinks toward LocalTime.MIN.

A generator of java.time.LocalTime values. Shrinks toward LocalTime.MIN.

Inherited from:
TimeVariants
final def anyMonth: Gen[Random, Month]

A generator of java.time.Month values. Shrinks toward Month.JANUARY.

A generator of java.time.Month values. Shrinks toward Month.JANUARY.

Inherited from:
TimeVariants

A generator of java.time.MonthDay values. Shrinks toward MonthDay.of(Month.JANUARY, 1).

A generator of java.time.MonthDay values. Shrinks toward MonthDay.of(Month.JANUARY, 1).

Inherited from:
TimeVariants

A generator of java.time.OffsetDateTime values. Shrinks toward OffsetDateTime.MIN.

A generator of java.time.OffsetDateTime values. Shrinks toward OffsetDateTime.MIN.

Inherited from:
TimeVariants

A generator of java.time.OffsetTime values. Shrinks torward OffsetTime.MIN.

A generator of java.time.OffsetTime values. Shrinks torward OffsetTime.MIN.

Inherited from:
TimeVariants
final def anyPeriod: Gen[Random, Period]

A generator of java.time.Period values. Shrinks toward Period.ZERO.

A generator of java.time.Period values. Shrinks toward Period.ZERO.

Inherited from:
TimeVariants
final def anyYear: Gen[Random, Year]

A generator of java.time.Year values. Shrinks toward Year.of(Year.MIN_VALUE).

A generator of java.time.Year values. Shrinks toward Year.of(Year.MIN_VALUE).

Inherited from:
TimeVariants

A generator of java.time.YearMonth values. Shrinks toward YearMonth.of(Year.MIN_VALUE, Month.JANUARY).

A generator of java.time.YearMonth values. Shrinks toward YearMonth.of(Year.MIN_VALUE, Month.JANUARY).

Inherited from:
TimeVariants
@silent("JavaConverters")
final def anyZoneId: Gen[Random, ZoneId]

A generator of java.time.ZoneId values. Doesn't have any shrinking.

A generator of java.time.ZoneId values. Doesn't have any shrinking.

Inherited from:
TimeVariants

A generator of java.time.ZoneOffset values. Shrinks toward ZoneOffset.MIN.

A generator of java.time.ZoneOffset values. Shrinks toward ZoneOffset.MIN.

Inherited from:
TimeVariants

A generator of java.time.ZonedDateTime values. Shrinks toward ZoneDateTime.of(LocalDateTime.MIN, zoneId).

A generator of java.time.ZonedDateTime values. Shrinks toward ZoneDateTime.of(LocalDateTime.MIN, zoneId).

Inherited from:
TimeVariants
final def causes[R <: Random & Sized, E](e: Gen[R, E], t: Gen[R, Throwable]): Gen[R, Cause[E]]

A generator of Cause values

A generator of Cause values

Inherited from:
GenZIO
final def chained[R <: Random & Sized, Env, E, A](gen: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]

A generator of effects that are the result of chaining the specified effect with itself a random number of times.

A generator of effects that are the result of chaining the specified effect with itself a random number of times.

Inherited from:
GenZIO
final def chainedN[R <: Random, Env, E, A](n: Int)(zio: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]

A generator of effects that are the result of chaining the specified effect with itself a given number of times.

A generator of effects that are the result of chaining the specified effect with itself a given number of times.

Inherited from:
GenZIO
final def concurrent[R, E, A](zio: ZIO[R, E, A]): Gen[Any, ZIO[R, E, A]]

A generator of effects that are the result of applying concurrency combinators to the specified effect that are guaranteed not to change its value.

A generator of effects that are the result of applying concurrency combinators to the specified effect that are guaranteed not to change its value.

Inherited from:
GenZIO
final def died[R](gen: Gen[R, Throwable]): Gen[R, UIO[Nothing]]

A generator of effects that have died with a Throwable.

A generator of effects that have died with a Throwable.

Inherited from:
GenZIO
final def failures[R, E](gen: Gen[R, E]): Gen[R, IO[E, Nothing]]

A generator of effects that have failed with an error.

A generator of effects that have failed with an error.

Inherited from:
GenZIO

A generator of finite zio.duration.Duration values inside the specified range: [min, max]. Shrinks toward min.

A generator of finite zio.duration.Duration values inside the specified range: [min, max]. Shrinks toward min.

Inherited from:
TimeVariants
final def function[R, A, B](gen: Gen[R, B]): Gen[R, A => B]

Constructs a generator of functions from A to B given a generator of B values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value, if they have the same hashCode.

Constructs a generator of functions from A to B given a generator of B values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value, if they have the same hashCode.

Inherited from:
FunctionVariants
final def function2[R, A, B, C](gen: Gen[R, C]): Gen[R, (A, B) => C]

A version of function that generates functions that accept two parameters.

A version of function that generates functions that accept two parameters.

Inherited from:
FunctionVariants
final def function3[R, A, B, C, D](gen: Gen[R, D]): Gen[R, (A, B, C) => D]

A version of function that generates functions that accept three parameters.

A version of function that generates functions that accept three parameters.

Inherited from:
FunctionVariants
final def function4[R, A, B, C, D, E](gen: Gen[R, E]): Gen[R, (A, B, C, D) => E]

A version of function that generates functions that accept four parameters.

A version of function that generates functions that accept four parameters.

Inherited from:
FunctionVariants
final def functionWith[R, A, B](gen: Gen[R, B])(hash: A => Int): Gen[R, A => B]

Constructs a generator of functions from A to B given a generator of B values and a hashing function for A values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value, if they have have the same hash. This is useful when A does not implement hashCode in a way that is consistent with equality.

Constructs a generator of functions from A to B given a generator of B values and a hashing function for A values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value, if they have have the same hash. This is useful when A does not implement hashCode in a way that is consistent with equality.

Inherited from:
FunctionVariants
final def functionWith2[R, A, B, C](gen: Gen[R, C])(hash: (A, B) => Int): Gen[R, (A, B) => C]

A version of functionWith that generates functions that accept two parameters.

A version of functionWith that generates functions that accept two parameters.

Inherited from:
FunctionVariants
final def functionWith3[R, A, B, C, D](gen: Gen[R, D])(hash: (A, B, C) => Int): Gen[R, (A, B, C) => D]

A version of functionWith that generates functions that accept three parameters.

A version of functionWith that generates functions that accept three parameters.

Inherited from:
FunctionVariants
final def functionWith4[R, A, B, C, D, E](gen: Gen[R, E])(hash: (A, B, C, D) => Int): Gen[R, (A, B, C, D) => E]

A version of functionWith that generates functions that accept four parameters.

A version of functionWith that generates functions that accept four parameters.

Inherited from:
FunctionVariants
final def instant(min: Instant, max: Instant): Gen[Random, Instant]

A generator of java.time.Instant values inside the specified range: [min, max]. Shrinks toward min.

A generator of java.time.Instant values inside the specified range: [min, max]. Shrinks toward min.

Inherited from:
TimeVariants

A generator of java.time.LocalDateTime values inside the specified range: [min, max]. Shrinks toward min.

A generator of java.time.LocalDateTime values inside the specified range: [min, max]. Shrinks toward min.

Inherited from:
TimeVariants

A generator of java.time.OffsetDateTime values inside the specified range: [min, max]. Shrinks toward min.

A generator of java.time.OffsetDateTime values inside the specified range: [min, max]. Shrinks toward min.

Inherited from:
TimeVariants
final def parallel[R, E, A](zio: ZIO[R, E, A]): Gen[Any, ZIO[R, E, A]]

A generator of effects that are the result of applying parallelism combinators to the specified effect that are guaranteed not to change its value.

A generator of effects that are the result of applying parallelism combinators to the specified effect that are guaranteed not to change its value.

Inherited from:
GenZIO
final def successes[R, A](gen: Gen[R, A]): Gen[R, UIO[A]]

A generator of successful effects.

A generator of successful effects.

Inherited from:
GenZIO

Concrete fields

A generator of alpha characters.

A generator of alpha characters.

A generator of alphanumeric characters. Shrinks toward '0'.

A generator of alphanumeric characters. Shrinks toward '0'.

A generator of alphanumeric strings. Shrinks towards the empty string.

A generator of alphanumeric strings. Shrinks towards the empty string.

A generator of bytes. Shrinks toward '0'.

A generator of bytes. Shrinks toward '0'.

A generator of characters. Shrinks toward '0'.

A generator of characters. Shrinks toward '0'.

A generator of doubles. Shrinks toward '0'.

A generator of doubles. Shrinks toward '0'.

A generator of floats. Shrinks toward '0'.

A generator of floats. Shrinks toward '0'.

A generator of hex chars(0-9,a-f,A-F).

A generator of hex chars(0-9,a-f,A-F).

A generator of integers. Shrinks toward '0'.

A generator of integers. Shrinks toward '0'.

A generator of longs. Shrinks toward '0'.

A generator of longs. Shrinks toward '0'.

A generator of lower hex chars(0-9, a-f).

A generator of lower hex chars(0-9, a-f).

A generator of shorts. Shrinks toward '0'.

A generator of shorts. Shrinks toward '0'.

A generator of universally unique identifiers. The returned generator will not have any shrinking.

A generator of universally unique identifiers. The returned generator will not have any shrinking.

A generator of Unicode characters. Shrinks toward '0'.

A generator of Unicode characters. Shrinks toward '0'.

A generator of upper hex chars(0-9, A-F).

A generator of upper hex chars(0-9, A-F).

A generator of booleans. Shrinks toward 'false'.

A generator of booleans. Shrinks toward 'false'.

val empty: Gen[Any, Nothing]

A generator of exponentially distributed doubles with mean 1. The shrinker will shrink toward 0.

A generator of exponentially distributed doubles with mean 1. The shrinker will shrink toward 0.

A generator of strings that can be encoded in the ISO-8859-1 character set.

A generator of strings that can be encoded in the ISO-8859-1 character set.

val none: Gen[Any, Option[Nothing]]

A constant generator of the empty value.

A constant generator of the empty value.

A generator of numeric characters. Shrinks toward '0'.

A generator of numeric characters. Shrinks toward '0'.

A generator of printable characters. Shrinks toward '!'.

A generator of printable characters. Shrinks toward '!'.

A generator of throwables.

A generator of throwables.

val unit: Gen[Any, Unit]

A constant generator of the unit value.

A constant generator of the unit value.

A generator of whitespace characters.

A generator of whitespace characters.