package scalacheck
- Alphabetic
- Public
- All
Type Members
- sealed abstract class Arbitrary[T] extends Serializable
- sealed trait Cogen[T] extends Serializable
- trait CogenLowPriority extends AnyRef
- sealed abstract class Gen[+T] extends Serializable
-
sealed abstract
class
Prop extends Serializable
- Annotations
- @EnableReflectiveInstantiation()
-
sealed
class
PropFromFun extends Prop
Helper class to satisfy ScalaJS compilation.
Helper class to satisfy ScalaJS compilation. Do not use this directly, use
Prop.apply
instead. -
class
Properties extends AnyRef
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 } }
- Annotations
- @EnableReflectiveInstantiation()
- final class ScalaCheckFramework extends Framework
- sealed abstract class Shrink[T] extends Serializable
- final class ShrinkFractional[T] extends Shrink[T]
- final class ShrinkIntegral[T] extends Shrink[T]
- trait ShrinkLowPriority extends AnyRef
Value Members
-
object
Arbitrary extends ArbitraryLowPriority with ArbitraryArities with Serializable
Defines implicit org.scalacheck.Arbitrary instances for common types.
Defines implicit org.scalacheck.Arbitrary instances for common types.
ScalaCheck uses implicit org.scalacheck.Arbitrary instances when creating properties out of functions with the
Prop.property
method, and when theArbitrary.arbitrary
method is used. For example, the following code requires that there exists an implicitArbitrary[MyClass]
instance:val myProp = Prop.forAll { myClass: MyClass => ... } val myGen = Arbitrary.arbitrary[MyClass]
The required implicit definition could look like this:
implicit val arbMyClass: Arbitrary[MyClass] = Arbitrary(...)
The factory method
Arbitrary(...)
takes a generator of typeGen[T]
and returns an instance ofArbitrary[T]
.The
Arbitrary
module defines implicit org.scalacheck.Arbitrary instances for common types, for convenient use in your properties and generators. - object Cogen extends CogenArities with CogenLowPriority with CogenVersionSpecific with Serializable
- object Gen extends GenArities with GenVersionSpecific with Serializable
- object Prop extends Serializable
- object Shrink extends ShrinkLowPriority with Serializable
- object Test