Class/Object

org.scalacheck

Gen

Related Docs: object Gen | package scalacheck

Permalink

sealed abstract class Gen[+T] extends Serializable

Self Type
Gen[T]
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Gen
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class RetryUntilException(n: Int) extends RuntimeException with Product with Serializable

    Permalink
  2. final class WithFilter extends AnyRef

    Permalink

    A class supporting filtered operations.

Value Members

  1. def !=[U](g: Gen[U]): Prop

    Permalink
  2. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  3. def !==[U](g: Gen[U]): Prop

    Permalink
  4. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  5. def :|(l: Symbol): Gen[T]

    Permalink

    Put a label on the generator to make test reports clearer

  6. def :|(l: String): Gen[T]

    Permalink

    Put a label on the generator to make test reports clearer

  7. def ==[U](g: Gen[U]): Prop

    Permalink

    Returns a new property that holds if and only if both this and the given generator generates the same result, or both generators generate no result.

  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def apply(p: Parameters, seed: Seed): Option[T]

    Permalink

    Evaluate this generator with the given parameters

  10. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def doPureApply(p: Parameters, seed: Seed, retries: Int = 100): R[T]

    Permalink
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def filter(p: (T) ⇒ Boolean): Gen[T]

    Permalink

    Create a new generator that uses this generator to produce a value that fulfills the given condition.

    Create a new generator that uses this generator to produce a value that fulfills the given condition. If the condition is not fulfilled, the generator fails (returns None). Also, make sure that the provided test property is side-effect free, eg it should not use external vars.

  16. def filterNot(p: (T) ⇒ Boolean): Gen[T]

    Permalink

    Create a new generator that uses this generator to produce a value that doesn't fulfill the given condition.

    Create a new generator that uses this generator to produce a value that doesn't fulfill the given condition. If the condition is fulfilled, the generator fails (returns None). Also, make sure that the provided test property is side-effect free, eg it should not use external vars.

  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def flatMap[U](f: (T) ⇒ Gen[U]): Gen[U]

    Permalink

    Create a new generator by flat-mapping the result of this generator

  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  22. def label(l: String): Gen[T]

    Permalink

    Put a label on the generator to make test reports clearer

  23. def map[U](f: (T) ⇒ U): Gen[U]

    Permalink

    Create a new generator by mapping the result of this generator

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

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

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

    Permalink
    Definition Classes
    AnyRef
  27. def pureApply(p: Parameters, seed: Seed, retries: Int = 100): T

    Permalink

    Evaluate this generator with the given parameters.

    Evaluate this generator with the given parameters.

    The generator will attempt to generate a valid T value. If a valid value is not produced it may retry several times, determined by the retries parameter (which defaults to 100).

    If all the retries fail it will throw a Gen.RetrievalError exception.

  28. def retryUntil(p: (T) ⇒ Boolean): Gen[T]

    Permalink

    Create a generator that calls this generator repeatedly until the given condition is fulfilled.

    Create a generator that calls this generator repeatedly until the given condition is fulfilled. The generated value is then returned. Make sure that the provided test property is side-effect free (it should not use external vars).

    If the generator fails more than 10000 times, a RetryUntilException will be thrown. You can call retryUntil with a second parameter to change this number.

  29. def retryUntil(p: (T) ⇒ Boolean, maxTries: Int): Gen[T]

    Permalink

    Create a generator that calls this generator repeatedly until the given condition is fulfilled.

    Create a generator that calls this generator repeatedly until the given condition is fulfilled. The generated value is then returned. Make sure that the provided test property is side-effect free (it should not use external vars).

    If the generator fails more than maxTries, a RetryUntilException will be thrown.

  30. def sample: Option[T]

    Permalink
  31. def suchThat(f: (T) ⇒ Boolean): Gen[T]

    Permalink

    Create a new generator that uses this generator to produce a value that fulfills the given condition.

    Create a new generator that uses this generator to produce a value that fulfills the given condition. If the condition is not fulfilled, the generator fails (returns None). Also, make sure that the provided test property is side-effect free, eg it should not use external vars. This method is identical to [Gen.filter].

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

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withFilter(p: (T) ⇒ Boolean): WithFilter

    Permalink

    Creates a non-strict filtered version of this generator.

  38. def withPerturb(f: (Seed) ⇒ Seed): Gen[T]

    Permalink

    Perform some RNG perturbation before generating

  39. def |:(l: Symbol): Gen[T]

    Permalink

    Put a label on the generator to make test reports clearer

  40. def |:(l: String): Gen[T]

    Permalink

    Put a label on the generator to make test reports clearer

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped