Gens

zio.prelude.laws.Gens
object Gens

Provides generators for data types from ZIO Prelude.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Gens.type

Members list

Value members

Concrete methods

def natural(min: Natural, max: Natural)(implicit trace: Trace): Gen[Any, Natural]

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

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

Attributes

def nonEmptyListOf[R <: Sized, A](a: Gen[R, A]): Gen[R, NonEmptyList[A]]

A generator of NonEmptyList values.

A generator of NonEmptyList values.

Attributes

A generator of NonEmptyMultiSet values.

A generator of NonEmptyMultiSet values.

Attributes

def nonEmptySetOf[R <: Sized, A](a: Gen[R, A]): Gen[R, NonEmptySet[A]]

A generator of NonEmptySet values.

A generator of NonEmptySet values.

Attributes

def parSeq[R <: Sized, Z <: Unit, A](z: Gen[R, Z], a: Gen[R, A]): Gen[R, ParSeq[Z, A]]
def state[R, S, A](s: Gen[R, S], a: Gen[R, A]): Gen[R, State[S, A]]

A generator of state transition functions.

A generator of state transition functions.

Attributes

def these[R <: Sized, A, B](a: Gen[R, A], b: Gen[R, B]): Gen[R, These[A, B]]

A generator of These values.

A generator of These values.

Attributes

def validation[R <: Sized, W, E, A](w: Gen[R, W], e: Gen[R, E], a: Gen[R, A]): Gen[R, ZValidation[W, E, A]]

A generator of Validation values.

A generator of Validation values.

Attributes

Concrete fields

val anyNatural: Gen[Any, Natural]

A generator of natural numbers. Shrinks toward '0'.

A generator of natural numbers. Shrinks toward '0'.

Attributes