|
scalacheck 1.6 API
|
|
org/scalacheck/Test.scala]
object
Test
extends AnyRef| Type Summary | |
type
|
NamedPropEvalCallback
Property evaluation callback. Takes property name, and number of passed
and discarded tests, respectively
|
type
|
PropEvalCallback
Property evaluation callback. Takes number of passed and
discarded tests, respectively
|
type
|
TestResCallback
Test callback. Takes property name, and test results.
|
| Value Summary | |
val
|
defaultParams
: Params
Default testing parameters
|
| Method Summary | |
def
|
check
(p : Prop) : Result
Tests a property and prints results to the console
|
def
|
check
(p : Prop, maxDiscarded : Int) : Result
Tests a property and prints results to the console. The
maxDiscarded parameter specifies how many
discarded tests that should be allowed before ScalaCheck
gives up. |
def
|
check
(prms : Params, p : Prop) : Result
Tests a property with the given testing parameters, and returns
the test results.
|
def
|
check
(prms : Params, p : Prop, propCallback : scala.Function2) : Result
Tests a property with the given testing parameters, and returns
the test results.
propCallback is a function which is
called each time the property is evaluted. Uses actors for parallel
test execution, unless workers is less than or equal to 1.
worker specifies how many working actors should be used.
wrkSize specifies how many tests each worker should
be scheduled with. |
def
|
checkProperties
(ps : Properties, prms : Params) : scala.Seq[(java.lang.String, Result)]
Tests all properties with the given testing parameters, and returns
the test results.
|
def
|
checkProperties
(ps : Properties, prms : Params, propCallback : scala.Function3, testCallback : scala.Function2) : scala.Seq[(java.lang.String, Result)]
Tests all properties with the given testing parameters, and returns
the test results.
f is a function which is called each
time a property is evaluted. g is a function called each
time a property has been fully tested. |
def
|
checkProperties
(ps : Properties) : scala.Seq[(java.lang.String, Result)]
Tests all properties with default testing parameters, and returns
the test results. The results are also printed on the console during
testing.
|
| 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 | |
sealed case class
|
Failed
(val args : scala.List[Arg[Any]], val labels : scala.collection.immutable.Set[java.lang.String]) extends Status with scala.Product
The property was proved wrong with the given concrete arguments.
|
sealed case class
|
GenException
(val e : java.lang.Throwable) extends Status with scala.Product
An exception was raised when trying to generate concrete arguments
for evaluating the property.
|
case class
|
Params
(val minSuccessfulTests : Int, val maxDiscardedTests : Int, val minSize : Int, val maxSize : Int, val rng : java.util.Random, val workers : Int, val wrkSize : Int) extends scala.Product
Test parameters
|
sealed case class
|
PropException
(val args : scala.List[Arg[Any]], val e : java.lang.Throwable, val labels : scala.collection.immutable.Set[java.lang.String]) extends Status with scala.Product
An exception was raised when trying to evaluate the property with the
given concrete arguments.
|
sealed case class
|
Proved
(val args : scala.List[Arg[Any]]) extends Status with scala.Product
ScalaCheck managed to prove the property correct
|
case class
|
Result
(val status : Status, val succeeded : Int, val discarded : Int, val freqMap : FreqMap) extends scala.Product
Test statistics
|
sealed trait
|
Status
extends AnyRef
Test status
|
| Object Summary | |
case object
|
Exhausted
extends Status with scala.Product
The property test was exhausted, it wasn't possible to generate enough
concrete arguments satisfying the preconditions to get enough passing
property evaluations.
|
case object
|
Passed
extends Status with scala.Product
ScalaCheck found enough cases for which the property holds, so the
property is considered correct. (It is not proved correct, though).
|
| Type Details |
type
PropEvalCallback
type
NamedPropEvalCallback
type
TestResCallback
| Value Details |
| Method Details |
def
check(prms : Params, p : Prop, propCallback : scala.Function2) : Result
propCallback is a function which is
called each time the property is evaluted. Uses actors for parallel
test execution, unless workers is less than or equal to 1.
worker specifies how many working actors should be used.
wrkSize specifies how many tests each worker should
be scheduled with.maxDiscarded parameter specifies how many
discarded tests that should be allowed before ScalaCheck
gives up.
def
checkProperties(ps : Properties, prms : Params, propCallback : scala.Function3, testCallback : scala.Function2) : scala.Seq[(java.lang.String, Result)]
f is a function which is called each
time a property is evaluted. g is a function called each
time a property has been fully tested.
def
checkProperties(ps : Properties, prms : Params) : scala.Seq[(java.lang.String, Result)]
def
checkProperties(ps : Properties) : scala.Seq[(java.lang.String, Result)]
|
scalacheck 1.6 API
|
|