org.specs.ScalaCheckVerifications

trait ScalaCheckVerifications

trait ScalaCheckVerifications

 extends ScalaObject


This trait defines the "verify" operator which can be used to specify properties to check as examples. Instead of writing:

 "startsWith verifies (a + b).startsWith(a)" in {
    property((a: String, b: String) => (a + b).startsWith(a)) must pass
 }
 it is possible to write directly:
   
 "startsWith" verifies ((a: String, b: String) => (a + b).startsWith(a))
 
 
 
This will create an example named "startsWith" and check the corresponding property. ScalaCheck parameters can be used with the "display" and set methods. For example:

 
 // will display the results and stop testing when 150 are passing.
 "startsWith" verifies ((a: String, b: String) => (a + b).startsWith(a)).display(minTestsOk->150) 
 
 


Source: Scalacheck.scala(41)

Direct Known Subclasses

ScalaCheck,

Nested Classes

AnyWithParameters, VerifiableExpectation,

 Methods

!= final def !=(arg0 : Any) Boolean Any
!= final def !=(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Any) Boolean Any
anyToAnyWithParameters implicit def anyToAnyWithParameters[T](f : T)
Transforms a function to an object supporting ScalaCheck parameters [details]
Any object can use this implicit definition. A stricter definition would declare one implicit conversion per function arity from 1 to 6
AnyWithParameters[T]
asInstanceOf final def asInstanceOf[T0] T0 Any
clone protected def clone Object AnyRef
eq final def eq(arg0 : Object) Boolean AnyRef
equals def equals(arg0 : Any) Boolean AnyRef
finalize protected def finalize Unit AnyRef
getClass final def getClass Class[Object] AnyRef
hashCode def hashCode Int AnyRef
isInstanceOf final def isInstanceOf[T0] Boolean Any
ne final def ne(arg0 : Object) Boolean AnyRef
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
toString def toString String AnyRef
toVerifies implicit def toVerifies(e : String)
This implicit uses a string describing a function to check with ScalaCheck with the "verifies" function
VerifiableExpectation
wait final def wait Unit AnyRef
wait final def wait(arg0 : Long) Unit AnyRef
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2007-2009. All Rights Reserved.