Properties

org.scalacheck.Properties
open class Properties(val name: String)

Represents a collection of properties, with convenient methods for checking all properties at once.

Properties are added in the following way:

object MyProps extends Properties("MyProps") {
  property("myProp1") = forAll { (n:Int, m:Int) =>
    n+m == m+n
  }
}

Attributes

Source
Properties.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

sealed class PropertySpecifier()

Used for specifying properties.

Used for specifying properties. Usage:

property("myProp") = ...

Attributes

Source
Properties.scala
Supertypes
class Object
trait Matchable
class Any
sealed class PropertyWithSeedSpecifier()

Attributes

Source
Properties.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def check(prms: Parameters): Unit

Convenience method that checks the properties with the given parameters (or default parameters, if not specified) and reports the result on the console.

Convenience method that checks the properties with the given parameters (or default parameters, if not specified) and reports the result on the console. Should only be used when running tests interactively within the Scala REPL.

If you need to get the results from the test use the check methods in org.scalacheck.Test instead.

Attributes

Source
Properties.scala
def include(ps: Properties): Unit

Adds all properties from another property collection to this one

Adds all properties from another property collection to this one

Attributes

Source
Properties.scala
def include(ps: Properties, prefix: String): Unit

Adds all properties from another property collection to this one with a prefix this is prepended to each included property's name.

Adds all properties from another property collection to this one with a prefix this is prepended to each included property's name.

Attributes

Source
Properties.scala
def main(args: Array[String]): Unit

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

Convenience method that makes it possible to use this property collection as an application that checks itself on execution. Calls System.exit with the exit code set to the number of failed properties.

Attributes

Source
Properties.scala

Customize the parameters specific to this class.

Customize the parameters specific to this class.

After the command-line (either main above or sbt) modifies the default parameters, this method is called with the current state of the parameters. This method must then return parameters. The default implementation returns the parameters unchanged. However, a user can override this method in a properties subclass. Their method can modify the parameters. Those parameters will take precedence when the properties are executed.

Attributes

Source
Properties.scala

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

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

Attributes

Source
Properties.scala

Concrete fields

val name: String

Attributes

Source
Properties.scala

Attributes

Source
Properties.scala