org.scalacheck

Properties

class Properties 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]) }

Linear Supertypes
Prop, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Properties
  2. Prop
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Properties(name: String)

Type Members

  1. class PropertySpecifier extends AnyRef

    Used for specifying properties.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def &&(p: Prop): Prop

    Returns a new property that holds if and only if both this and the given property hold.

    Returns a new property that holds if and only if both this and the given property hold. If one of the properties doesn't generate a result, the new property will generate false.

    Definition Classes
    Prop
  4. def ++(p: Prop): Prop

    Returns a new property that holds if and only if both this and the given property hold.

    Returns a new property that holds if and only if both this and the given property hold. If one of the properties doesn't generate a result, the new property will generate the same result as the other property.

    Definition Classes
    Prop
  5. def :|(l: Symbol): Prop

    Put a label on the property to make test reports clearer

    Put a label on the property to make test reports clearer

    Definition Classes
    Prop
  6. def :|(l: String): Prop

    Put a label on the property to make test reports clearer

    Put a label on the property to make test reports clearer

    Definition Classes
    Prop
  7. def ==(p: Prop): Prop

    Returns a new property that holds if and only if both this and the given property generates a result with the exact same status.

    Returns a new property that holds if and only if both this and the given property generates a result with the exact same status. Note that this means that if one of the properties is proved, and the other one passed, then the resulting property will fail.

    Definition Classes
    Prop
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def ==>(p: ⇒ Prop): Prop

    Combines two properties through implication

    Combines two properties through implication

    Definition Classes
    Prop
  10. def apply(p: Params): Result

    Definition Classes
    PropertiesProp
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def check: Unit

    Convenience method that checks the properties and reports the result on the console.

    Convenience method that checks the properties and reports the result on the console. If you need to get the results from the test use the check methods in Test instead.

    Definition Classes
    PropertiesProp
  13. def check(prms: Params): Unit

    Convenience method that checks the properties with the given parameters and reports the result on the console.

    Convenience method that checks the properties with the given parameters and reports the result on the console. If you need to get the results from the test use the check methods in Test instead.

    Definition Classes
    PropertiesProp
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def combine(p: Prop)(f: (Result, Result) ⇒ Result): Prop

    Definition Classes
    Prop
  16. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def flatMap(f: (Result) ⇒ Prop): Prop

    Definition Classes
    Prop
  20. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  22. def include(ps: Properties): Unit

    Adds all properties from another property collection to this one.

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. def label(l: String): Prop

    Put a label on the property to make test reports clearer

    Put a label on the property to make test reports clearer

    Definition Classes
    Prop
  25. def main(args: Array[String]): Unit

    Convenience method that makes it possible to use this property as an application that checks itself on execution

    Convenience method that makes it possible to use this property as an application that checks itself on execution

    Definition Classes
    Prop
  26. def mainCallsExit: Boolean

    Whether main should call System.

    Whether main should call System.exit with an exit code. Defaults to true; override to change.

    Definition Classes
    Prop
  27. def mainRunner(args: Array[String]): Int

    The logic for main, separated out to make it easier to avoid System.

    The logic for main, separated out to make it easier to avoid System.exit calls. Returns exit code.

    Definition Classes
    PropertiesProp
  28. def map(f: (Result) ⇒ Result): Prop

    Definition Classes
    Prop
  29. val name: String

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

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def properties: Seq[(String, Prop)]

    Returns all properties of this collection in a list of name/property pairs.

  34. lazy val property: PropertySpecifier

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

    Definition Classes
    AnyRef
  36. def toString(): String

    Definition Classes
    Prop → AnyRef → Any
  37. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def |:(l: Symbol): Prop

    Put a label on the property to make test reports clearer

    Put a label on the property to make test reports clearer

    Definition Classes
    Prop
  41. def |:(l: String): Prop

    Put a label on the property to make test reports clearer

    Put a label on the property to make test reports clearer

    Definition Classes
    Prop
  42. def ||(p: Prop): Prop

    Returns a new property that holds if either this or the given property (or both) hold.

    Returns a new property that holds if either this or the given property (or both) hold.

    Definition Classes
    Prop

Deprecated Value Members

  1. def ===(p: Prop): Prop

    Returns a new property that holds if and only if both this and the given property generates a result with the exact same status.

    Returns a new property that holds if and only if both this and the given property generates a result with the exact same status. Note that this means that if one of the properties is proved, and the other one passed, then the resulting property will fail.

    Definition Classes
    Prop
    Annotations
    @deprecated
    Deprecated

    (Since version 1.7) Use == instead.

Inherited from Prop

Inherited from AnyRef

Inherited from Any

Ungrouped