PropF

sealed trait PropF[F[_]]

An effectful property.

Effectful properties are ones in which each sample evaluates in a type constructor. That is, instead of directly computing a result from a single sample of generated values, the result is computed in some effect F[_] -- e.g., cats.effect.IO or scala.concurrent.Future. A property which computes in an effect F[_] has the type PropF[F].

PropF[F] instances can be constructed for any effect which has a MonadError[F, Throwable] instance.

The most common way to construct PropF[F] values is by using one of the forAllF methods on the PropF companion. These are analogous to Prop.forAll from ScalaCheck. When computing the result of a single sample, F[Unit] values are treated as successes and any exceptions thrown are treated as falsifications.

Companion
object
class Object
trait Matchable
class Any
class Result[F]

Value members

Concrete methods

def check(testParams: Parameters, genParams: Parameters): F[Result]

Checks this property.

Checks this property.

def checkOne(params: Parameters): F[Result[F]]

Checks a single sample.

Checks a single sample.

def flatMap(f: Result[F] => PropF[F]): PropF[F]
def map(f: Result[F] => Result[F]): PropF[F]

Implicits

Implicits

implicit val F: MonadError[F, Throwable]