ScalaCheck

org.specs2.ScalaCheck

Attributes

Graph
Supertypes
trait GenInstances
trait FragmentsFactory
trait AsResultProp
trait ExpectationsCreation
trait ResultChecks
trait MatchResultStackTrace
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

object given_Monad_Gen extends Monad[Gen]

Attributes

Inherited from:
GenInstances
Supertypes
trait Monad[Gen]
trait Applicative[Gen]
trait Functor[Gen]
class Object
trait Matchable
class Any
Show all

Value members

Inherited methods

def check(prop: Prop, parameters: Parameters, prettyFreqMap: FreqMap[Set[Any]] => Pretty): Result

checks if the property is true for each generated value, and with the specified parameters

checks if the property is true for each generated value, and with the specified parameters

Attributes

Inherited from:
ScalaCheckPropertyCheck
def checkProperties(properties: Properties, parameters: Parameters, prettyFreqMap: FreqMap[Set[Any]] => Pretty): Result

Attributes

Inherited from:
ScalaCheckPropertyCheck
protected def checkResultFailure(r: => Result): Result

this method can be overridden to throw exceptions when checking a result

this method can be overridden to throw exceptions when checking a result

Attributes

Inherited from:
ResultChecks
def createExpectable[T](t: => T, alias: String => String): Expectable[T]

Attributes

Returns

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: => String): Expectable[T]

Attributes

Returns

an Expectable with a description

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T): Expectable[T]

Attributes

Returns

an Expectable

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: Option[String => String]): Expectable[T]

Attributes

Returns

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectableWithShowAs[T](t: => T, showAs: => String): Expectable[T]

Attributes

Returns

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
def display(minTestsOk: Int, minSize: Int, maxDiscardRatio: Float, maxSize: Int, workers: Int, callback: TestCallback, loader: Option[ClassLoader]): Parameters

create parameters with verbose = true

create parameters with verbose = true

Attributes

Inherited from:
ScalaCheckParameters
protected def fragmentFactory: FragmentFactory

Attributes

Inherited from:
FragmentsFactory
def frequencies(fq: FreqMap[Set[Any]], parameters: Parameters, prettyFreqMap: FreqMap[Set[Any]] => Pretty): String

Attributes

Inherited from:
ScalaCheckPropertyCheck
protected def mapResult(r: Result): Result

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

Attributes

Inherited from:
ResultChecks
def prettyResult(res: Result, parameters: Parameters, initialSeed: => Seed, freqMapPretty: FreqMap[Set[Any]] => Pretty): Pretty

copied from ScalaCheck to be able to inject the proper freqMap pretty

copied from ScalaCheck to be able to inject the proper freqMap pretty

Attributes

Inherited from:
ScalaCheckPropertyCheck
def prop[T1, T2, T3, T4, T5, T6, T7, T8, R](result: (T1, T2, T3, T4, T5, T6, T7, T8) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, arbitrary3: Arbitrary[T3], shrink3: Shrink[T3], pretty3: T3 => Pretty, arbitrary4: Arbitrary[T4], shrink4: Shrink[T4], pretty4: T4 => Pretty, arbitrary5: Arbitrary[T5], shrink5: Shrink[T5], pretty5: T5 => Pretty, arbitrary6: Arbitrary[T6], shrink6: Shrink[T6], pretty6: T6 => Pretty, arbitrary7: Arbitrary[T7], shrink7: Shrink[T7], pretty7: T7 => Pretty, arbitrary8: Arbitrary[T8], shrink8: Shrink[T8], pretty8: T8 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction8[T1, T2, T3, T4, T5, T6, T7, T8, R]

create a ScalaCheck property from a function of 8 arguments

create a ScalaCheck property from a function of 8 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T1, T2, T3, T4, T5, T6, T7, R](result: (T1, T2, T3, T4, T5, T6, T7) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, arbitrary3: Arbitrary[T3], shrink3: Shrink[T3], pretty3: T3 => Pretty, arbitrary4: Arbitrary[T4], shrink4: Shrink[T4], pretty4: T4 => Pretty, arbitrary5: Arbitrary[T5], shrink5: Shrink[T5], pretty5: T5 => Pretty, arbitrary6: Arbitrary[T6], shrink6: Shrink[T6], pretty6: T6 => Pretty, arbitrary7: Arbitrary[T7], shrink7: Shrink[T7], pretty7: T7 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction7[T1, T2, T3, T4, T5, T6, T7, R]

create a ScalaCheck property from a function of 7 arguments

create a ScalaCheck property from a function of 7 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T1, T2, T3, T4, T5, T6, R](result: (T1, T2, T3, T4, T5, T6) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, arbitrary3: Arbitrary[T3], shrink3: Shrink[T3], pretty3: T3 => Pretty, arbitrary4: Arbitrary[T4], shrink4: Shrink[T4], pretty4: T4 => Pretty, arbitrary5: Arbitrary[T5], shrink5: Shrink[T5], pretty5: T5 => Pretty, arbitrary6: Arbitrary[T6], shrink6: Shrink[T6], pretty6: T6 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction6[T1, T2, T3, T4, T5, T6, R]

create a ScalaCheck property from a function of 6 arguments

create a ScalaCheck property from a function of 6 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T1, T2, T3, T4, T5, R](result: (T1, T2, T3, T4, T5) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, arbitrary3: Arbitrary[T3], shrink3: Shrink[T3], pretty3: T3 => Pretty, arbitrary4: Arbitrary[T4], shrink4: Shrink[T4], pretty4: T4 => Pretty, arbitrary5: Arbitrary[T5], shrink5: Shrink[T5], pretty5: T5 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction5[T1, T2, T3, T4, T5, R]

create a ScalaCheck property from a function of 5 arguments

create a ScalaCheck property from a function of 5 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T1, T2, T3, T4, R](result: (T1, T2, T3, T4) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, arbitrary3: Arbitrary[T3], shrink3: Shrink[T3], pretty3: T3 => Pretty, arbitrary4: Arbitrary[T4], shrink4: Shrink[T4], pretty4: T4 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction4[T1, T2, T3, T4, R]

create a ScalaCheck property from a function of 4 arguments

create a ScalaCheck property from a function of 4 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T1, T2, T3, R](result: (T1, T2, T3) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, arbitrary3: Arbitrary[T3], shrink3: Shrink[T3], pretty3: T3 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction3[T1, T2, T3, R]

create a ScalaCheck property from a function of 3 arguments

create a ScalaCheck property from a function of 3 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T1, T2, R](result: (T1, T2) => R)(using arbitrary1: Arbitrary[T1], shrink1: Shrink[T1], pretty1: T1 => Pretty, arbitrary2: Arbitrary[T2], shrink2: Shrink[T2], pretty2: T2 => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction2[T1, T2, R]

create a ScalaCheck property from a function of 2 arguments

create a ScalaCheck property from a function of 2 arguments

Attributes

Inherited from:
ScalaCheckPropertyCreation
def prop[T, R](result: T => R)(implicit arbitrary: Arbitrary[T], shrink: Shrink[T], pretty: T => Pretty, prettyFreqMap: FreqMap[Set[Any]] => Pretty, asResult: AsResult[R], parameters: Parameters): ScalaCheckFunction1[T, R]

create a ScalaCheck property from a function

create a ScalaCheck property from a function

Attributes

Inherited from:
ScalaCheckPropertyCreation
def properties(ps: Properties): Fragments

display properties as examples

display properties as examples

Attributes

Inherited from:
ScalaCheckPropertyDsl
protected def sandboxResult(r: => Result): Result

Attributes

Returns

the result without any side-effects

Inherited from:
ResultChecks
def set(minTestsOk: Int, minSize: Int, maxDiscardRatio: Float, maxSize: Int, workers: Int, callback: TestCallback, loader: Option[ClassLoader]): Parameters

create parameters with verbose = false

create parameters with verbose = false

Attributes

Inherited from:
ScalaCheckParameters
protected def setStacktrace(m: Result): Result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

Attributes

Inherited from:
MatchResultStackTrace
def showCause(t: Throwable): String

Attributes

Returns

the cause of the exception as a String if there is one

Inherited from:
ScalaCheckPropertyCheck
def theBlock(t: => Nothing): Expectable[Nothing]

Attributes

Inherited from:
ExpectationsCreation
def theValue[T](t: => T): Expectable[T]

Attributes

Inherited from:
ExpectationsCreation

Givens

Inherited givens

given asResultToProp[R](using evidence$1: AsResult[R]): asResultToProp[R]

Attributes

Inherited from:
AsResultProp
given defaultFreqMapPretty: FreqMap[Set[Any]] => Pretty

Attributes

Inherited from:
ScalaCheckParameters

default parameters. Uses ScalaCheck default values and doesn't print anything to the console

default parameters. Uses ScalaCheck default values and doesn't print anything to the console

Attributes

Inherited from:
ScalaCheckParameters

Attributes

Inherited from:
GenInstances
given propAsResult(using p: Parameters, pfq: FreqMap[Set[Any]] => Pretty): propAsResult

implicit typeclass instance to create examples from a Prop

implicit typeclass instance to create examples from a Prop

Attributes

Inherited from:
AsResultProp
given propToScalaCheckProperty(using parameters: Parameters, prettyFreqMap: FreqMap[Set[Any]] => Pretty): propToScalaCheckProperty

Attributes

Inherited from:
ScalaCheckPropertyDsl
given propertiesAsResult(using p: Parameters, pfq: FreqMap[Set[Any]] => Pretty): propertiesAsResult

implicit typeclass instance to create examples from Properties

implicit typeclass instance to create examples from Properties

Attributes

Inherited from:
AsResultPropLowImplicits
given scalaCheckPropertyAsResult[S <: ScalaCheckProperty]: scalaCheckPropertyAsResult[S]

Attributes

Inherited from:
AsResultPropLowImplicits