scalacheck

object Prop

[source: scalacheck/Prop.scala]

object Prop
extends Testable
Method Summary
def ==> (b : => Boolean, p : => Prop) : Prop
Implication
def all (ps : Seq[Prop]) : Prop
Combines properties into one, which is true if and only if all the properties are true
def exception (e : Throwable) : Prop
A property that denotes an exception
implicit def extendedAny [T](x : T) : ExtendedAny[T]
implicit def extendedBoolean (b : Boolean) : ExtendedBoolean
def falsified : Prop
A property that always is false
def forAll [A, P](g : Gen[A])(f : (A) => Prop) : Prop
Universal quantifier
def forAllDefaultShrink [A](g : Gen[A])(f : (A) => Prop)(implicit a : (Arb[A]) => Arbitrary[A]) : Prop
Universal quantifier, shrinks failed arguments with the default shrink function for the type
def forAllShrink [A](g : Gen[A], shrink : (A) => Stream[A])(f : (A) => Prop) : Prop
Universal quantifier, shrinks failed arguments with given shrink function
def iff [T](x : T, f : PartialFunction[T, Prop]) : Prop
def imply [T](x : T, f : PartialFunction[T, Prop]) : Prop
Implication with several conditions
implicit def propBoolean (b : Boolean) : Prop
def property [A1, A2, A3, A4, P](f : (A1, A2, A3, A4) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3], implicit a4 : (Arb[A4]) => Arbitrary[A4]) : Prop
def property [A1, A2, A3, A4, A5, P](f : (A1, A2, A3, A4, A5) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3], implicit a4 : (Arb[A4]) => Arbitrary[A4], implicit a5 : (Arb[A5]) => Arbitrary[A5]) : Prop
def property [A1, A2, A3, P](f : (A1, A2, A3) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3]) : Prop
def property [A1, P](f : (A1) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1]) : Prop
def property [A1, A2, P](f : (A1, A2) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2]) : Prop
def property (p : => Prop) : Prop
def property [A1, A2, A3, A4, A5, A6, P](f : (A1, A2, A3, A4, A5, A6) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3], implicit a4 : (Arb[A4]) => Arbitrary[A4], implicit a5 : (Arb[A5]) => Arbitrary[A5], implicit a6 : (Arb[A6]) => Arbitrary[A6]) : Prop
def proved : Prop
A property that always is true
def undecided : Prop
A property that never is proved or falsified
Methods inherited from Testable
specify, specify, specify, specify, specify, specify, specify, checkProperties, checkProperties, checkProperties, testCases, allProperties
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Class Summary
case class Exception (val as : scala.List[(Any, Int)], val e : Throwable) extends Result with Product
Evaluating the property with the given arguments raised an exception
class ExtendedAny [T](x : T) extends AnyRef
class ExtendedBoolean (b : Boolean) extends AnyRef
case class False (val as : scala.List[(Any, Int)]) extends Result with Product
The property was false with the given arguments
sealed abstract class Result (val args : scala.List[(Any, Int)]) extends AnyRef
The result of evaluating a property
case class True (val as : scala.List[(Any, Int)]) extends Result with Product
The property was true with the given arguments
Method Details
def undecided : Prop
A property that never is proved or falsified

def falsified : Prop
A property that always is false

def proved : Prop
A property that always is true

def exception(e : Throwable) : Prop
A property that denotes an exception

def ==>(b : => Boolean, p : => Prop) : Prop
Implication

def imply[T](x : T, f : PartialFunction[T, Prop]) : Prop
Implication with several conditions

def iff[T](x : T, f : PartialFunction[T, Prop]) : Prop

def all(ps : Seq[Prop]) : Prop
Combines properties into one, which is true if and only if all the properties are true

def forAll[A, P](g : Gen[A])(f : (A) => Prop) : Prop
Universal quantifier

def forAllShrink[A](g : Gen[A], shrink : (A) => Stream[A])(f : (A) => Prop) : Prop
Universal quantifier, shrinks failed arguments with given shrink function

def forAllDefaultShrink[A](g : Gen[A])(f : (A) => Prop)(implicit a : (Arb[A]) => Arbitrary[A]) : Prop
Universal quantifier, shrinks failed arguments with the default shrink function for the type

implicit def extendedBoolean(b : Boolean) : ExtendedBoolean

implicit def extendedAny[T](x : T) : ExtendedAny[T]

implicit def propBoolean(b : Boolean) : Prop

def property(p : => Prop) : Prop

def property[A1, P](f : (A1) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1]) : Prop

def property[A1, A2, P](f : (A1, A2) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2]) : Prop

def property[A1, A2, A3, P](f : (A1, A2, A3) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3]) : Prop

def property[A1, A2, A3, A4, P](f : (A1, A2, A3, A4) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3], implicit a4 : (Arb[A4]) => Arbitrary[A4]) : Prop

def property[A1, A2, A3, A4, A5, P](f : (A1, A2, A3, A4, A5) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3], implicit a4 : (Arb[A4]) => Arbitrary[A4], implicit a5 : (Arb[A5]) => Arbitrary[A5]) : Prop

def property[A1, A2, A3, A4, A5, A6, P](f : (A1, A2, A3, A4, A5, A6) => P)(implicit p : (P) => Prop, implicit a1 : (Arb[A1]) => Arbitrary[A1], implicit a2 : (Arb[A2]) => Arbitrary[A2], implicit a3 : (Arb[A3]) => Arbitrary[A3], implicit a4 : (Arb[A4]) => Arbitrary[A4], implicit a5 : (Arb[A5]) => Arbitrary[A5], implicit a6 : (Arb[A6]) => Arbitrary[A6]) : Prop