Properties
Represents a collection of properties, with convenient methods for checking all properties at once.
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
}
}
Type members
Value members
Concrete methods
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.
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.
Adds all properties from another property collection to this one
Adds all properties from another property collection to this one
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.
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.
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.
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.