Class/Object

zio.test

Gen

Related Docs: object Gen | package test

Permalink

case class Gen[-R, +A](sample: ZStream[R, Nothing, Sample[R, A]]) extends Product with Serializable

A Gen[R, A] represents a generator of values of type A, which requires an environment R. Generators may be random or deterministic.

Self Type
Gen[R, A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Gen
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Gen(sample: ZStream[R, Nothing, Sample[R, A]])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def <*>[R1 <: R, B](that: Gen[R1, B]): Gen[R1, (A, B)]

    Permalink
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. final def filter(f: (A) ⇒ Boolean): Gen[R, A]

    Permalink

    Filters the values produced by this generator, discarding any values that do not meet the specified predicate.

    Filters the values produced by this generator, discarding any values that do not meet the specified predicate. Using filter can reduce test performance, especially if many values must be discarded. It is recommended to use combinators such as map and flatMap to create generators of the desired values instead.

    val evens: Gen[Random, Int] = Gen.anyInt.map(_ * 2)
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def flatMap[R1 <: R, B](f: (A) ⇒ Gen[R1, B]): Gen[R1, B]

    Permalink
  11. final def flatten[R1 <: R, B](implicit ev: <:<[A, Gen[R1, B]]): Gen[R1, B]

    Permalink
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def map[B](f: (A) ⇒ B): Gen[R, B]

    Permalink
  15. final def mapM[R1 <: R, B](f: (A) ⇒ ZIO[R1, Nothing, B]): Gen[R1, B]

    Permalink

    Maps an effectual function over a generator.

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def reshrink[R1 <: R, B](f: (A) ⇒ Sample[R1, B]): Gen[R1, B]

    Permalink

    Discards the shrinker for this generator and applies a new shrinker by mapping each value to a sample using the specified function.

    Discards the shrinker for this generator and applies a new shrinker by mapping each value to a sample using the specified function. This is useful when the process to shrink a value is simpler than the process used to generate it.

  20. val sample: ZStream[R, Nothing, Sample[R, A]]

    Permalink
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def withFilter(f: (A) ⇒ Boolean): Gen[R, A]

    Permalink
  26. final def zip[R1 <: R, B](that: Gen[R1, B]): Gen[R1, (A, B)]

    Permalink
  27. final def zipWith[R1 <: R, B, C](that: Gen[R1, B])(f: (A, B) ⇒ C): Gen[R1, C]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped