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
the Arbitrary.arbitrary
method is used. For example, the
following code requires that there exists an implicit
Arbitrary[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 type
Gen[T]
and returns an instance of Arbitrary[T]
.
The Arbitrary
module defines implicit org.scalacheck.Arbitrary
instances for common types, for convenient use in your properties and
generators.
- Companion
- class
Value members
Implicits
Inherited implicits
Arbitrary instance of scala.collection.BitSet
Arbitrary instance of scala.collection.BitSet
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of any org.scalacheck.util.Buildable container (such as lists, arrays, streams / lazy lists, etc). The maximum size of the container depends on the size generation parameter.
Arbitrary instance of any org.scalacheck.util.Buildable container (such as lists, arrays, streams / lazy lists, etc). The maximum size of the container depends on the size generation parameter.
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of any org.scalacheck.util.Buildable container (such as maps). The maximum size of the container depends on the size generation parameter.
Arbitrary instance of any org.scalacheck.util.Buildable container (such as maps). The maximum size of the container depends on the size generation parameter.
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of Duration.
Arbitrary instance of Duration.
In addition to FiniteDuration
values, this can generate Duration.Inf
,
Duration.MinusInf
, and Duration.Undefined
.
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of the Either type
Arbitrary instance of the Either type
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of FiniteDuration
Arbitrary instance of FiniteDuration
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of Function10
Arbitrary instance of Function10
- Inherited from
- ArbitraryArities
Arbitrary instance of Function11
Arbitrary instance of Function11
- Inherited from
- ArbitraryArities
Arbitrary instance of Function12
Arbitrary instance of Function12
- Inherited from
- ArbitraryArities
Arbitrary instance of Function13
Arbitrary instance of Function13
- Inherited from
- ArbitraryArities
Arbitrary instance of Function14
Arbitrary instance of Function14
- Inherited from
- ArbitraryArities
Arbitrary instance of Function15
Arbitrary instance of Function15
- Inherited from
- ArbitraryArities
Arbitrary instance of Function16
Arbitrary instance of Function16
- Inherited from
- ArbitraryArities
Arbitrary instance of Function17
Arbitrary instance of Function17
- Inherited from
- ArbitraryArities
Arbitrary instance of Function18
Arbitrary instance of Function18
- Inherited from
- ArbitraryArities
Arbitrary instance of Function19
Arbitrary instance of Function19
- Inherited from
- ArbitraryArities
Arbitrary instance of Function2
Arbitrary instance of Function2
- Inherited from
- ArbitraryArities
Arbitrary instance of Function20
Arbitrary instance of Function20
- Inherited from
- ArbitraryArities
Arbitrary instance of Function21
Arbitrary instance of Function21
- Inherited from
- ArbitraryArities
Arbitrary instance of Function22
Arbitrary instance of Function22
- Inherited from
- ArbitraryArities
Arbitrary instance of Function3
Arbitrary instance of Function3
- Inherited from
- ArbitraryArities
Arbitrary instance of Function4
Arbitrary instance of Function4
- Inherited from
- ArbitraryArities
Arbitrary instance of Function5
Arbitrary instance of Function5
- Inherited from
- ArbitraryArities
Arbitrary instance of Function6
Arbitrary instance of Function6
- Inherited from
- ArbitraryArities
Arbitrary instance of Function7
Arbitrary instance of Function7
- Inherited from
- ArbitraryArities
Arbitrary instance of Function8
Arbitrary instance of Function8
- Inherited from
- ArbitraryArities
Arbitrary instance of Function9
Arbitrary instance of Function9
- Inherited from
- ArbitraryArities
Arbitrary instance of the Future type
Arbitrary instance of the Future type
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of org.scalacheck.Gen
Arbitrary instance of org.scalacheck.Gen
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of gen params
Arbitrary instance of gen params
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of the Option type
Arbitrary instance of the Option type
- Inherited from
- ArbitraryLowPriority
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of test parameters
Arbitrary instance of test parameters
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of the Try type
Arbitrary instance of the Try type
- Inherited from
- ArbitraryLowPriority
Arbitrary instance of 10-Tuple
Arbitrary instance of 10-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 11-Tuple
Arbitrary instance of 11-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 12-Tuple
Arbitrary instance of 12-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 13-Tuple
Arbitrary instance of 13-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 14-Tuple
Arbitrary instance of 14-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 15-Tuple
Arbitrary instance of 15-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 16-Tuple
Arbitrary instance of 16-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 17-Tuple
Arbitrary instance of 17-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 18-Tuple
Arbitrary instance of 18-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 19-Tuple
Arbitrary instance of 19-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 20-Tuple
Arbitrary instance of 20-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 21-Tuple
Arbitrary instance of 21-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 22-Tuple
Arbitrary instance of 22-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 3-Tuple
Arbitrary instance of 3-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 4-Tuple
Arbitrary instance of 4-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 5-Tuple
Arbitrary instance of 5-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 6-Tuple
Arbitrary instance of 6-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 7-Tuple
Arbitrary instance of 7-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 8-Tuple
Arbitrary instance of 8-Tuple
- Inherited from
- ArbitraryArities
Arbitrary instance of 9-Tuple
Arbitrary instance of 9-Tuple
- Inherited from
- ArbitraryArities