object Gen extends GenZIO with FunctionVariants with TimeVariants with Serializable
- Alphabetic
- By Inheritance
- Gen
- Serializable
- Serializable
- TimeVariants
- FunctionVariants
- GenZIO
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
alphaChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of alpha characters.
-
def
alphaNumericChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of alphanumeric characters.
A generator of alphanumeric characters. Shrinks toward '0'.
-
def
alphaNumericString(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator of alphanumeric strings.
A generator of alphanumeric strings. Shrinks towards the empty string.
-
def
alphaNumericStringBounded(min: Int, max: Int)(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator of alphanumeric strings whose size falls within the specified bounds.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asciiChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of US-ASCII characters.
A generator of US-ASCII characters. Shrinks toward '0'.
-
def
asciiString(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator US-ASCII strings.
A generator US-ASCII strings. Shrinks towards the empty string.
-
def
bigDecimal(min: BigDecimal, max: BigDecimal)(implicit trace: ZTraceElement): Gen[Random, BigDecimal]
A generator of big decimals inside the specified range: [start, end].
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
andmin
. -
def
bigInt(min: BigInt, max: BigInt)(implicit trace: ZTraceElement): Gen[Random, BigInt]
A generator of big integers inside the specified range: [start, end].
A generator of big integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
boolean(implicit trace: ZTraceElement): Gen[Random, Boolean]
A generator of booleans.
A generator of booleans. Shrinks toward 'false'.
-
def
bounded[R <: Random, A](min: Int, max: Int)(f: (Int) ⇒ Gen[R, A])(implicit trace: ZTraceElement): Gen[R, A]
A generator whose size falls within the specified bounds.
-
def
byte(min: Byte, max: Byte)(implicit trace: ZTraceElement): Gen[Random, Byte]
A generator of byte values inside the specified range: [start, end].
A generator of byte values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
byte(implicit trace: ZTraceElement): Gen[Random, Byte]
A generator of bytes.
A generator of bytes. Shrinks toward '0'.
-
final
def
causes[R <: Random with Sized, E](e: Gen[R, E], t: Gen[R, Throwable])(implicit trace: ZTraceElement): Gen[R, Cause[E]]
A generator of
Cause
valuesA generator of
Cause
values- Definition Classes
- GenZIO
-
final
def
chained[R <: Random with Sized, Env, E, A](gen: Gen[R, ZIO[Env, E, A]])(implicit trace: ZTraceElement): 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.
- Definition Classes
- GenZIO
-
final
def
chainedN[R <: Random, Env, E, A](n: Int)(zio: Gen[R, ZIO[Env, E, A]])(implicit trace: ZTraceElement): 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.
- Definition Classes
- GenZIO
-
def
char(min: Char, max: Char)(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of character values inside the specified range: [start, end].
A generator of character values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
char(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of characters.
A generator of characters. Shrinks toward '0'.
-
def
chunkOf[R <: Random with Sized, A](g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Chunk[A]]
A sized generator of chunks.
-
def
chunkOf1[R <: Random with Sized, A](g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, NonEmptyChunk[A]]
A sized generator of non-empty chunks.
-
def
chunkOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Chunk[A]]
A generator of chunks whose size falls within the specified bounds.
-
def
chunkOfN[R <: Random, A](n: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Chunk[A]]
A generator of chunks of the specified size.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
collectAll[R, A](gens: Iterable[Gen[R, A]])(implicit trace: ZTraceElement): Gen[R, List[A]]
Composes the specified generators to create a cartesian product of elements with the specified function.
-
def
concatAll[R, A](gens: ⇒ Iterable[Gen[R, A]])(implicit trace: ZTraceElement): 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.
-
final
def
concurrent[R, E, A](zio: ZIO[R, E, A])(implicit trace: ZTraceElement): 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.
- Definition Classes
- GenZIO
-
def
const[A](a: ⇒ A)(implicit trace: ZTraceElement): Gen[Any, A]
A constant generator of the specified value.
-
def
constSample[R, A](sample: ⇒ Sample[R, A])(implicit trace: ZTraceElement): Gen[R, A]
A constant generator of the specified sample.
-
final
def
dayOfWeek(implicit trace: ZTraceElement): Gen[Random, DayOfWeek]
A generator of
java.time.DayOfWeek
values.A generator of
java.time.DayOfWeek
values. Shrinks towardDayOfWeek.MONDAY
.- Definition Classes
- TimeVariants
-
final
def
died[R](gen: Gen[R, Throwable])(implicit trace: ZTraceElement): Gen[R, UIO[Nothing]]
A generator of effects that have died with a
Throwable
.A generator of effects that have died with a
Throwable
.- Definition Classes
- GenZIO
-
def
double(min: Double, max: Double)(implicit trace: ZTraceElement): Gen[Random, Double]
A generator of double values inside the specified range: [start, end].
A generator of double values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
double(implicit trace: ZTraceElement): Gen[Random, Double]
A generator of doubles.
A generator of doubles. Shrinks toward '0'.
- def either[R <: Random, A, B](left: Gen[R, A], right: Gen[R, B])(implicit trace: ZTraceElement): Gen[R, Either[A, B]]
- def elements[A](as: A*)(implicit trace: ZTraceElement): Gen[Random, A]
- def empty(implicit trace: ZTraceElement): Gen[Any, Nothing]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exponential(implicit trace: ZTraceElement): Gen[Random, Double]
A generator of exponentially distributed doubles with mean
1
.A generator of exponentially distributed doubles with mean
1
. The shrinker will shrink toward0
. -
final
def
failures[R, E](gen: Gen[R, E])(implicit trace: ZTraceElement): 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.
- Definition Classes
- GenZIO
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
finiteDuration(min: zio.Duration, max: zio.Duration)(implicit trace: ZTraceElement): Gen[Random, zio.Duration]
A generator of finite
zio.duration.Duration
values inside the specified range: [min, max].A generator of finite
zio.duration.Duration
values inside the specified range: [min, max]. Shrinks toward min.- Definition Classes
- TimeVariants
-
final
def
finiteDuration(implicit trace: ZTraceElement): Gen[Random, zio.Duration]
A generator of finite
zio.duration.Duration
values.A generator of finite
zio.duration.Duration
values. Shrinks towardDuration.Zero
.- Definition Classes
- TimeVariants
-
def
float(implicit trace: ZTraceElement): Gen[Random, Float]
A generator of floats.
A generator of floats. Shrinks toward '0'.
-
def
fromIterable[R, A](as: Iterable[A], shrinker: (A) ⇒ ZStream[R, Nothing, A] = defaultShrinker)(implicit trace: ZTraceElement): Gen[R, A]
Constructs a deterministic generator that only generates the specified fixed values.
-
final
def
fromRandom[A](f: (Random) ⇒ UIO[A])(implicit trace: ZTraceElement): Gen[Random, A]
Constructs a generator from a function that uses randomness.
Constructs a generator from a function that uses randomness. The returned generator will not have any shrinking.
-
final
def
fromRandomSample[R <: Random, A](f: (Random) ⇒ UIO[Sample[R, A]])(implicit trace: ZTraceElement): Gen[R, A]
Constructs a generator from a function that uses randomness to produce a sample.
-
def
fromZIO[R, A](effect: URIO[R, A])(implicit trace: ZTraceElement): Gen[R, A]
Constructs a generator from an effect that constructs a value.
-
def
fromZIOSample[R, A](effect: ZIO[R, Nothing, Sample[R, A]])(implicit trace: ZTraceElement): Gen[R, A]
Constructs a generator from an effect that constructs a sample.
-
final
def
function[R, A, B](gen: Gen[R, B])(implicit trace: ZTraceElement): Gen[R, (A) ⇒ B]
Constructs a generator of functions from
A
toB
given a generator ofB
values.Constructs a generator of functions from
A
toB
given a generator ofB
values. TwoA
values will be considered to be equal, and thus will be guaranteed to generate the sameB
value, if they have the samehashCode
.- Definition Classes
- FunctionVariants
-
final
def
function2[R, A, B, C](gen: Gen[R, C])(implicit trace: ZTraceElement): 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.- Definition Classes
- FunctionVariants
-
final
def
function3[R, A, B, C, D](gen: Gen[R, D])(implicit trace: ZTraceElement): 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.- Definition Classes
- FunctionVariants
-
final
def
function4[R, A, B, C, D, E](gen: Gen[R, E])(implicit trace: ZTraceElement): 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.- Definition Classes
- FunctionVariants
-
final
def
functionWith[R, A, B](gen: Gen[R, B])(hash: (A) ⇒ Int)(implicit trace: ZTraceElement): Gen[R, (A) ⇒ B]
Constructs a generator of functions from
A
toB
given a generator ofB
values and a hashing function forA
values.Constructs a generator of functions from
A
toB
given a generator ofB
values and a hashing function forA
values. TwoA
values will be considered to be equal, and thus will be guaranteed to generate the sameB
value, if they have have the same hash. This is useful whenA
does not implementhashCode
in a way that is consistent with equality.- Definition Classes
- FunctionVariants
-
final
def
functionWith2[R, A, B, C](gen: Gen[R, C])(hash: (A, B) ⇒ Int)(implicit trace: ZTraceElement): 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.- Definition Classes
- FunctionVariants
-
final
def
functionWith3[R, A, B, C, D](gen: Gen[R, D])(hash: (A, B, C) ⇒ Int)(implicit trace: ZTraceElement): 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.- Definition Classes
- FunctionVariants
-
final
def
functionWith4[R, A, B, C, D, E](gen: Gen[R, E])(hash: (A, B, C, D) ⇒ Int)(implicit trace: ZTraceElement): 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.- Definition Classes
- FunctionVariants
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hexChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of hex chars(0-9,a-f,A-F).
-
def
hexCharLower(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of lower hex chars(0-9, a-f).
-
def
hexCharUpper(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of upper hex chars(0-9, A-F).
-
final
def
instant(min: Instant, max: Instant)(implicit trace: ZTraceElement): Gen[Random, Instant]
A generator of
java.time.Instant
values inside the specified range: [min, max].A generator of
java.time.Instant
values inside the specified range: [min, max]. Shrinks toward min.- Definition Classes
- TimeVariants
-
final
def
instant(implicit trace: ZTraceElement): Gen[Random, Instant]
A generator of
java.time.Instant
values.A generator of
java.time.Instant
values. Shrinks towardInstant.MIN
.- Definition Classes
- TimeVariants
-
def
int(min: Int, max: Int)(implicit trace: ZTraceElement): Gen[Random, Int]
A generator of integers inside the specified range: [start, end].
A generator of integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
int(implicit trace: ZTraceElement): Gen[Random, Int]
A generator of integers.
A generator of integers. Shrinks toward '0'.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iso_8859_1(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator of strings that can be encoded in the ISO-8859-1 character set.
-
def
large[R <: Random with Sized, A](f: (Int) ⇒ Gen[R, A], min: Int = 0)(implicit trace: ZTraceElement): Gen[R, A]
A sized generator that uses a uniform distribution of size values.
A sized generator that uses a uniform distribution of size values. A large number of larger sizes will be generated.
- def listOf[R <: Random with Sized, A](g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, List[A]]
- def listOf1[R <: Random with Sized, A](g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, ::[A]]
-
def
listOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, List[A]]
A generator of lists whose size falls within the specified bounds.
- def listOfN[R <: Random, A](n: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, List[A]]
-
final
def
localDate(implicit trace: ZTraceElement): Gen[Random, LocalDate]
A generator of
java.time.LocalDate
values.A generator of
java.time.LocalDate
values. Shrinks towardLocalDate.MIN
.- Definition Classes
- TimeVariants
-
final
def
localDateTime(min: LocalDateTime, max: LocalDateTime)(implicit trace: ZTraceElement): Gen[Random, LocalDateTime]
A generator of
java.time.LocalDateTime
values inside the specified range: [min, max].A generator of
java.time.LocalDateTime
values inside the specified range: [min, max]. Shrinks toward min.- Definition Classes
- TimeVariants
-
final
def
localDateTime(implicit trace: ZTraceElement): Gen[Random, LocalDateTime]
A generator of
java.time.LocalDateTime
values.A generator of
java.time.LocalDateTime
values. Shrinks towardLocalDateTime.MIN
.- Definition Classes
- TimeVariants
-
final
def
localTime(implicit trace: ZTraceElement): Gen[Random, LocalTime]
A generator of
java.time.LocalTime
values.A generator of
java.time.LocalTime
values. Shrinks towardLocalTime.MIN
.- Definition Classes
- TimeVariants
-
def
long(min: Long, max: Long)(implicit trace: ZTraceElement): Gen[Random, Long]
A generator of long values in the specified range: [start, end].
A generator of long values in the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
long(implicit trace: ZTraceElement): Gen[Random, Long]
A generator of longs.
A generator of longs. Shrinks toward '0'.
-
def
mapOf[R <: Random with Sized, A, B](key: Gen[R, A], value: Gen[R, B])(implicit trace: ZTraceElement): Gen[R, Map[A, B]]
A sized generator of maps.
-
def
mapOf1[R <: Random with Sized, A, B](key: Gen[R, A], value: Gen[R, B])(implicit trace: ZTraceElement): Gen[R, Map[A, B]]
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])(implicit trace: ZTraceElement): Gen[R, Map[A, B]]
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])(implicit trace: ZTraceElement): Gen[R, Map[A, B]]
A generator of maps of the specified size.
-
def
medium[R <: Random with Sized, A](f: (Int) ⇒ Gen[R, A], min: Int = 0)(implicit trace: ZTraceElement): Gen[R, A]
A sized generator that uses an exponential distribution of size values.
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.
-
final
def
month(implicit trace: ZTraceElement): Gen[Random, Month]
A generator of
java.time.Month
values.A generator of
java.time.Month
values. Shrinks towardMonth.JANUARY
.- Definition Classes
- TimeVariants
-
final
def
monthDay(implicit trace: ZTraceElement): Gen[Random, MonthDay]
A generator of
java.time.MonthDay
values.A generator of
java.time.MonthDay
values. Shrinks towardMonthDay.of(Month.JANUARY, 1)
.- Definition Classes
- TimeVariants
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
none(implicit trace: ZTraceElement): Gen[Any, Option[Nothing]]
A constant generator of the empty value.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
numericChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of numeric characters.
A generator of numeric characters. Shrinks toward '0'.
-
final
def
offsetDateTime(min: OffsetDateTime, max: OffsetDateTime)(implicit trace: ZTraceElement): Gen[Random, OffsetDateTime]
A generator of
java.time.OffsetDateTime
values inside the specified range: [min, max].A generator of
java.time.OffsetDateTime
values inside the specified range: [min, max]. Shrinks toward min.- Definition Classes
- TimeVariants
-
final
def
offsetDateTime(implicit trace: ZTraceElement): Gen[Random, OffsetDateTime]
A generator of
java.time.OffsetDateTime
values.A generator of
java.time.OffsetDateTime
values. Shrinks towardOffsetDateTime.MIN
.- Definition Classes
- TimeVariants
-
final
def
offsetTime(implicit trace: ZTraceElement): Gen[Random, OffsetTime]
A generator of
java.time.OffsetTime
values.A generator of
java.time.OffsetTime
values. Shrinks torwardOffsetTime.MIN
.- Definition Classes
- TimeVariants
- def oneOf[R <: Random, A](as: Gen[R, A]*)(implicit trace: ZTraceElement): Gen[R, A]
-
def
option[R <: Random, A](gen: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Option[A]]
A generator of optional values.
A generator of optional values. Shrinks toward
None
. -
final
def
parallel[R, E, A](zio: ZIO[R, E, A])(implicit trace: ZTraceElement): 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.
- Definition Classes
- GenZIO
-
def
partialFunction[R <: Random, A, B](gen: Gen[R, B])(implicit trace: ZTraceElement): Gen[R, PartialFunction[A, B]]
Constructs a generator of partial functions from
A
toB
given a generator ofB
values.Constructs a generator of partial functions from
A
toB
given a generator ofB
values. TwoA
values will be considered to be equal, and thus will be guaranteed to generate the sameB
value or both be outside the partial function's domain, if they have the samehashCode
. -
def
partialFunctionWith[R <: Random, A, B](gen: Gen[R, B])(hash: (A) ⇒ Int)(implicit trace: ZTraceElement): Gen[R, PartialFunction[A, B]]
Constructs a generator of partial functions from
A
toB
given a generator ofB
values and a hashing function forA
values.Constructs a generator of partial functions from
A
toB
given a generator ofB
values and a hashing function forA
values. TwoA
values will be considered to be equal, and thus will be guaranteed to generate the sameB
value or both be outside the partial function's domain, if they have have the same hash. This is useful whenA
does not implementhashCode
in a way that is consistent with equality. -
final
def
period(implicit trace: ZTraceElement): Gen[Random, Period]
A generator of
java.time.Period
values.A generator of
java.time.Period
values. Shrinks towardPeriod.ZERO
.- Definition Classes
- TimeVariants
-
def
printableChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of printable characters.
A generator of printable characters. Shrinks toward '!'.
-
def
setOf[R <: Random with Sized, A](gen: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Set[A]]
A sized generator of sets.
-
def
setOf1[R <: Random with Sized, A](gen: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Set[A]]
A sized generator of non-empty sets.
-
def
setOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Set[A]]
A generator of sets whose size falls within the specified bounds.
-
def
setOfN[R <: Random, A](n: Int)(gen: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Set[A]]
A generator of sets of the specified size.
-
def
short(min: Short, max: Short)(implicit trace: ZTraceElement): Gen[Random, Short]
A generator of short values inside the specified range: [start, end].
A generator of short values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
-
def
short(implicit trace: ZTraceElement): Gen[Random, Short]
A generator of shorts.
A generator of shorts. Shrinks toward '0'.
- def size(implicit trace: ZTraceElement): Gen[Sized, Int]
-
def
sized[R <: Sized, A](f: (Int) ⇒ Gen[R, A])(implicit trace: ZTraceElement): Gen[R, A]
A sized generator, whose size falls within the specified bounds.
-
def
small[R <: Random with Sized, A](f: (Int) ⇒ Gen[R, A], min: Int = 0)(implicit trace: ZTraceElement): Gen[R, A]
A sized generator that uses an exponential distribution of size values.
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])(implicit trace: ZTraceElement): Gen[R, Option[A]]
- def string[R <: Random with Sized](char: Gen[R, Char])(implicit trace: ZTraceElement): Gen[R, String]
-
def
string(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator of strings.
A generator of strings. Shrinks towards the empty string.
- def string1[R <: Random with Sized](char: Gen[R, Char])(implicit trace: ZTraceElement): Gen[R, String]
-
def
stringBounded[R <: Random](min: Int, max: Int)(g: Gen[R, Char])(implicit trace: ZTraceElement): Gen[R, String]
A generator of strings whose size falls within the specified bounds.
- def stringN[R <: Random](n: Int)(char: Gen[R, Char])(implicit trace: ZTraceElement): Gen[R, String]
-
final
def
successes[R, A](gen: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, UIO[A]]
A generator of successful effects.
A generator of successful effects.
- Definition Classes
- GenZIO
-
def
suspend[R, A](gen: ⇒ Gen[R, A])(implicit trace: ZTraceElement): Gen[R, A]
Lazily constructs a generator.
Lazily constructs a generator. This is useful to avoid infinite recursion when creating generators that refer to themselves.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
throwable(implicit trace: ZTraceElement): Gen[Random, Throwable]
A generator of throwables.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unfoldGen[R <: Random with Sized, S, A](s: S)(f: (S) ⇒ Gen[R, (S, A)])(implicit trace: ZTraceElement): Gen[R, List[A]]
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)])(implicit trace: ZTraceElement): 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.
-
def
unicodeChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of Unicode characters.
A generator of Unicode characters. Shrinks toward '0'.
-
def
uniform(implicit trace: ZTraceElement): Gen[Random, Double]
A generator of uniformly distributed doubles between [0, 1].
A generator of uniformly distributed doubles between [0, 1]. The shrinker will shrink toward
0
. -
def
unit(implicit trace: ZTraceElement): Gen[Any, Unit]
A constant generator of the unit value.
-
def
uuid(implicit trace: ZTraceElement): Gen[Random, UUID]
A generator of universally unique identifiers.
A generator of universally unique identifiers. The returned generator will not have any shrinking.
- def vectorOf[R <: Random with Sized, A](g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Vector[A]]
- def vectorOf1[R <: Random with Sized, A](g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Vector[A]]
-
def
vectorOfBounded[R <: Random, A](min: Int, max: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Vector[A]]
A generator of vectors whose size falls within the specified bounds.
- def vectorOfN[R <: Random, A](n: Int)(g: Gen[R, A])(implicit trace: ZTraceElement): Gen[R, Vector[A]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
weighted[R <: Random, A](gs: (Gen[R, A], Double)*)(implicit trace: ZTraceElement): Gen[R, A]
A generator which chooses one of the given generators according to their weights.
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
whitespaceChars(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of whitespace characters.
-
final
def
year(implicit trace: ZTraceElement): Gen[Random, Year]
A generator of
java.time.Year
values.A generator of
java.time.Year
values. Shrinks towardYear.of(Year.MIN_VALUE)
.- Definition Classes
- TimeVariants
-
final
def
yearMonth(implicit trace: ZTraceElement): Gen[Random, YearMonth]
A generator of
java.time.YearMonth
values.A generator of
java.time.YearMonth
values. Shrinks towardYearMonth.of(Year.MIN_VALUE, Month.JANUARY)
.- Definition Classes
- TimeVariants
-
final
def
zoneId(implicit trace: ZTraceElement): Gen[Random, ZoneId]
A generator of
java.time.ZoneId
values.A generator of
java.time.ZoneId
values. Doesn't have any shrinking.- Definition Classes
- TimeVariants
- Annotations
- @silent( "JavaConverters" )
-
final
def
zoneOffset(implicit trace: ZTraceElement): Gen[Random, ZoneOffset]
A generator of
java.time.ZoneOffset
values.A generator of
java.time.ZoneOffset
values. Shrinks towardZoneOffset.MIN
.- Definition Classes
- TimeVariants
-
final
def
zonedDateTime(implicit trace: ZTraceElement): Gen[Random, ZonedDateTime]
A generator of
java.time.ZonedDateTime
values.A generator of
java.time.ZonedDateTime
values. Shrinks towardZoneDateTime.of(LocalDateTime.MIN, zoneId)
.- Definition Classes
- TimeVariants
Deprecated Value Members
-
def
anyASCIIChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of US-ASCII characters.
A generator of US-ASCII characters. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use asciiChar
-
def
anyASCIIString(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator US-ASCII strings.
A generator US-ASCII strings. Shrinks towards the empty string.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use asciiString
-
def
anyByte(implicit trace: ZTraceElement): Gen[Random, Byte]
A generator of bytes.
A generator of bytes. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use byte
-
def
anyChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of characters.
A generator of characters. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use char
-
final
def
anyDayOfWeek(implicit trace: ZTraceElement): Gen[Random, DayOfWeek]
A generator of
java.time.DayOfWeek
values.A generator of
java.time.DayOfWeek
values. Shrinks towardDayOfWeek.MONDAY
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use dayOfWeek
-
def
anyDouble(implicit trace: ZTraceElement): Gen[Random, Double]
A generator of doubles.
A generator of doubles. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use double
-
final
def
anyFiniteDuration(implicit trace: ZTraceElement): Gen[Random, zio.Duration]
A generator of finite
zio.duration.Duration
values.A generator of finite
zio.duration.Duration
values. Shrinks towardDuration.Zero
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use finiteDuration
-
def
anyFloat(implicit trace: ZTraceElement): Gen[Random, Float]
A generator of floats.
A generator of floats. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use float
-
def
anyHexChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of hex chars(0-9,a-f,A-F).
A generator of hex chars(0-9,a-f,A-F).
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use hexChar
-
final
def
anyInstant(implicit trace: ZTraceElement): Gen[Random, Instant]
A generator of
java.time.Instant
values.A generator of
java.time.Instant
values. Shrinks towardInstant.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use instant
-
def
anyInt(implicit trace: ZTraceElement): Gen[Random, Int]
A generator of integers.
A generator of integers. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use int
-
final
def
anyLocalDate(implicit trace: ZTraceElement): Gen[Random, LocalDate]
A generator of
java.time.LocalDate
values.A generator of
java.time.LocalDate
values. Shrinks towardLocalDate.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use localDate
-
final
def
anyLocalDateTime(implicit trace: ZTraceElement): Gen[Random, LocalDateTime]
A generator of
java.time.LocalDateTime
values.A generator of
java.time.LocalDateTime
values. Shrinks towardLocalDateTime.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use localDateTime
-
final
def
anyLocalTime(implicit trace: ZTraceElement): Gen[Random, LocalTime]
A generator of
java.time.LocalTime
values.A generator of
java.time.LocalTime
values. Shrinks towardLocalTime.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use localTime
-
def
anyLong(implicit trace: ZTraceElement): Gen[Random, Long]
A generator of longs.
A generator of longs. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use long
-
def
anyLowerHexChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of lower hex chars(0-9, a-f).
A generator of lower hex chars(0-9, a-f).
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use hexCharLower
-
final
def
anyMonth(implicit trace: ZTraceElement): Gen[Random, Month]
A generator of
java.time.Month
values.A generator of
java.time.Month
values. Shrinks towardMonth.JANUARY
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use month
-
final
def
anyMonthDay(implicit trace: ZTraceElement): Gen[Random, MonthDay]
A generator of
java.time.MonthDay
values.A generator of
java.time.MonthDay
values. Shrinks towardMonthDay.of(Month.JANUARY, 1)
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use monthDay
-
final
def
anyOffsetDateTime(implicit trace: ZTraceElement): Gen[Random, OffsetDateTime]
A generator of
java.time.OffsetDateTime
values.A generator of
java.time.OffsetDateTime
values. Shrinks towardOffsetDateTime.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use offsetDateTime
-
final
def
anyOffsetTime(implicit trace: ZTraceElement): Gen[Random, OffsetTime]
A generator of
java.time.OffsetTime
values.A generator of
java.time.OffsetTime
values. Shrinks torwardOffsetTime.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use offsetTime
-
final
def
anyPeriod(implicit trace: ZTraceElement): Gen[Random, Period]
A generator of
java.time.Period
values.A generator of
java.time.Period
values. Shrinks towardPeriod.ZERO
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use period
-
def
anyShort(implicit trace: ZTraceElement): Gen[Random, Short]
A generator of shorts.
A generator of shorts. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use short
-
def
anyString(implicit trace: ZTraceElement): Gen[Random with Sized, String]
A generator of strings.
A generator of strings. Shrinks towards the empty string.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use string
-
def
anyUUID(implicit trace: ZTraceElement): Gen[Random, UUID]
A generator of universally unique identifiers.
A generator of universally unique identifiers. The returned generator will not have any shrinking.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use uuid
-
def
anyUnicodeChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of Unicode characters.
A generator of Unicode characters. Shrinks toward '0'.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use unicodeChar
-
def
anyUpperHexChar(implicit trace: ZTraceElement): Gen[Random, Char]
A generator of upper hex chars(0-9, A-F).
A generator of upper hex chars(0-9, A-F).
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use hexCharUpper
-
final
def
anyYear(implicit trace: ZTraceElement): Gen[Random, Year]
A generator of
java.time.Year
values.A generator of
java.time.Year
values. Shrinks towardYear.of(Year.MIN_VALUE)
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use year
-
final
def
anyYearMonth(implicit trace: ZTraceElement): Gen[Random, YearMonth]
A generator of
java.time.YearMonth
values.A generator of
java.time.YearMonth
values. Shrinks towardYearMonth.of(Year.MIN_VALUE, Month.JANUARY)
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use yearMonth
-
final
def
anyZoneId(implicit trace: ZTraceElement): Gen[Random, ZoneId]
A generator of
java.time.ZoneId
values.A generator of
java.time.ZoneId
values. Doesn't have any shrinking.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zoneId
-
final
def
anyZoneOffset(implicit trace: ZTraceElement): Gen[Random, ZoneOffset]
A generator of
java.time.ZoneOffset
values.A generator of
java.time.ZoneOffset
values. Shrinks towardZoneOffset.MIN
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zoneOffset
-
final
def
anyZonedDateTime(implicit trace: ZTraceElement): Gen[Random, ZonedDateTime]
A generator of
java.time.ZonedDateTime
values.A generator of
java.time.ZonedDateTime
values. Shrinks towardZoneDateTime.of(LocalDateTime.MIN, zoneId)
.- Definition Classes
- TimeVariants
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zonedDateTime
-
def
crossAll[R, A](gens: Iterable[Gen[R, A]])(implicit trace: ZTraceElement): 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use collectAll
-
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)(implicit trace: ZTraceElement): 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use cross
-
def
crossN[R, A, B, C, D](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C])(f: (A, B, C) ⇒ D)(implicit trace: ZTraceElement): 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use cross
-
def
crossN[R, A, B, C](gen1: Gen[R, A], gen2: Gen[R, B])(f: (A, B) ⇒ C)(implicit trace: ZTraceElement): 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use cross
-
def
fromEffect[R, A](effect: URIO[R, A])(implicit trace: ZTraceElement): Gen[R, A]
Constructs a generator from an effect that constructs a value.
Constructs a generator from an effect that constructs a value.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromZIO
-
def
fromEffectSample[R, A](effect: ZIO[R, Nothing, Sample[R, A]])(implicit trace: ZTraceElement): Gen[R, A]
Constructs a generator from an effect that constructs a sample.
Constructs a generator from an effect that constructs a sample.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromZIOSample
-
def
zipAll[R, A](gens: Iterable[Gen[R, A]])(implicit trace: ZTraceElement): Gen[R, List[A]]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use collectAll
-
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)(implicit trace: ZTraceElement): Gen[R, L]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
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)(implicit trace: ZTraceElement): Gen[R, K]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
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)(implicit trace: ZTraceElement): Gen[R, J]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
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)(implicit trace: ZTraceElement): Gen[R, I]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
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)(implicit trace: ZTraceElement): Gen[R, H]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
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)(implicit trace: ZTraceElement): Gen[R, G]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
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)(implicit trace: ZTraceElement): Gen[R, F]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
def
zipN[R, A, B, C, D](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C])(f: (A, B, C) ⇒ D)(implicit trace: ZTraceElement): Gen[R, D]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
-
def
zipN[R, A, B, C](gen1: Gen[R, A], gen2: Gen[R, B])(f: (A, B) ⇒ C)(implicit trace: ZTraceElement): Gen[R, C]
Zips the specified generators together pairwise.
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip