org.scalacheck

class Properties

[source: org/scalacheck/Properties.scala]

class Properties(val name : java.lang.String)
extends Prop
Represents a collection of properties, with convenient methods for checking all properties at once. This class is itself a property, which holds if and only if all of the contained properties hold.

Properties are added in the following way:

object MyProps extends Properties("MyProps") { property("myProp1") = forAll { (n:Int, m:Int) => n+m == m+n } property("myProp2") = ((0/1) throws classOf[ArithmeticException]) }

Value Summary
lazy val property : AnyRef
Method Summary
def apply (p : Params) : Result
override def check (prms : Params) : Unit
override def check : Unit
Convenience method that checks all properties and reports the result on the console. Calling ps.check is equal to calling Test.checkProperties(ps), but this method does not return the test statistics. If you need to get the results from the tests, or if you want more control over the test parameters, use the checkProperties methods in Test instead.
def include (ps : Properties) : Unit
Adds all properties from another property collection to this one.
def properties : scala.Seq[(java.lang.String, Prop)]
Returns all properties of this collection in a list of name/property pairs.
def specify [A1, A2, A3, A4, A5, A6, P](propName : java.lang.String, f : (A1, A2, A3, A4, A5, A6) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3], implicit a4 : Arbitrary[A4], implicit s4 : Shrink[A4], implicit a5 : Arbitrary[A5], implicit s5 : Shrink[A5], implicit a6 : Arbitrary[A6], implicit s6 : Shrink[A6]) : Unit
Adds a property to this property collection
def specify [A1, A2, P](propName : java.lang.String, f : (A1, A2) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2]) : Unit
Adds a property to this property collection
def specify [A1, A2, A3, P](propName : java.lang.String, f : (A1, A2, A3) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3]) : Unit
Adds a property to this property collection
def specify [A1, A2, A3, A4, P](propName : java.lang.String, f : (A1, A2, A3, A4) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3], implicit a4 : Arbitrary[A4], implicit s4 : Shrink[A4]) : Unit
Adds a property to this property collection
def specify [A1, P](propName : java.lang.String, f : (A1) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1]) : Unit
Adds a property to this property collection
def specify [A1, A2, A3, A4, A5, P](propName : java.lang.String, f : (A1, A2, A3, A4, A5) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3], implicit a4 : Arbitrary[A4], implicit s4 : Shrink[A4], implicit a5 : Arbitrary[A5], implicit s5 : Shrink[A5]) : Unit
Adds a property to this property collection
def specify (propName : java.lang.String, prop : => Prop) : Unit
Adds a property to this property collection
Methods inherited from Prop
map, flatMap, combine, main, &&, ||, ++, ==, ===, toString, label, :|, |:, :|, |:
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
lazy val property : AnyRef

Method Details
def properties : scala.Seq[(java.lang.String, Prop)]
Returns all properties of this collection in a list of name/property pairs.

def apply(p : Params) : Result
Overrides
Prop.apply

override def check(prms : Params) : Unit
Overrides
Prop.check

override def check : Unit
Convenience method that checks all properties and reports the result on the console. Calling ps.check is equal to calling Test.checkProperties(ps), but this method does not return the test statistics. If you need to get the results from the tests, or if you want more control over the test parameters, use the checkProperties methods in Test instead.
Overrides
Prop.check

def include(ps : Properties) : Unit
Adds all properties from another property collection to this one.

@scala.deprecated

def specify(propName : java.lang.String, prop : => Prop) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = prop instead.

@scala.deprecated

def specify[A1, P](propName : java.lang.String, f : (A1) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1]) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = forAll(...) instead

@scala.deprecated

def specify[A1, A2, P](propName : java.lang.String, f : (A1, A2) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2]) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = forAll(...) instead

@scala.deprecated

def specify[A1, A2, A3, P](propName : java.lang.String, f : (A1, A2, A3) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3]) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = forAll(...) instead

@scala.deprecated

def specify[A1, A2, A3, A4, P](propName : java.lang.String, f : (A1, A2, A3, A4) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3], implicit a4 : Arbitrary[A4], implicit s4 : Shrink[A4]) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = forAll(...) instead

@scala.deprecated

def specify[A1, A2, A3, A4, A5, P](propName : java.lang.String, f : (A1, A2, A3, A4, A5) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3], implicit a4 : Arbitrary[A4], implicit s4 : Shrink[A4], implicit a5 : Arbitrary[A5], implicit s5 : Shrink[A5]) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = forAll(...) instead

@scala.deprecated

def specify[A1, A2, A3, A4, A5, A6, P](propName : java.lang.String, f : (A1, A2, A3, A4, A5, A6) => P)(implicit p : (P) => Prop, implicit a1 : Arbitrary[A1], implicit s1 : Shrink[A1], implicit a2 : Arbitrary[A2], implicit s2 : Shrink[A2], implicit a3 : Arbitrary[A3], implicit s3 : Shrink[A3], implicit a4 : Arbitrary[A4], implicit s4 : Shrink[A4], implicit a5 : Arbitrary[A5], implicit s5 : Shrink[A5], implicit a6 : Arbitrary[A6], implicit s6 : Shrink[A6]) : Unit
Adds a property to this property collection
Deprecated
Use property(propName) = forAll(...) instead