Test.StrongCheck
- Package
- purescript-strongcheckDEPRECATED
- Repository
- purescript-contrib/purescript-strongcheck
#quickCheck Source
quickCheck :: forall prop. Testable prop => prop -> Effect UnitChecks the proposition for 100 random values.
#quickCheck' Source
quickCheck' :: forall prop. Testable prop => Int -> prop -> Effect UnitChecks the proposition for the specified number of random values.
#smallCheck Source
smallCheck :: forall prop. Testable prop => prop -> Effect UnitExhaustively checks the proposition for all possible values. Assumes the generator is a finite generator.
#statCheckPure Source
statCheckPure :: forall prop. Testable prop => Seed -> Number -> prop -> ResultChecks that the proposition has a certain probability of being true for arbitrary values in a pure setting, returning a result.
#assertNotEq Source
assertNotEq :: forall a. Eq a => Show a => a -> a -> ResultAsserts that two values are not equal, resulting in a Failure if they
are, with a message showing the values involved.
Re-exports from Test.StrongCheck.Arbitrary
#Arbitrary Source
class Arbitrary t whereThe Arbitrary class represents those types whose values can be
randomly-generated.
arbitrary uses the Gen monad to express a random generator for
the type t. Combinators in the Test.StrongCheck.Gen
module can be used to construct random generators.
Members
Instances
Arbitrary BooleanArbitrary NumberArbitrary IntArbitrary StringArbitrary CharArbitrary UnitArbitrary Ordering(Arbitrary a) => Arbitrary (Array a)(Coarbitrary a, Arbitrary b) => Arbitrary (a -> b)(Arbitrary a, Arbitrary b) => Arbitrary (Tuple a b)(Arbitrary a) => Arbitrary (Maybe a)(Arbitrary a, Arbitrary b) => Arbitrary (Either a b)(Arbitrary a) => Arbitrary (List a)(Arbitrary a) => Arbitrary (Identity a)(Arbitrary a) => Arbitrary (Lazy a)
#Coarbitrary Source
class Coarbitrary t whereThe Coarbitrary class represents types which appear on the left of
an Arbitrary function arrow.
To construct an Arbitrary instance for the type a -> b, we need to
use the input of type a to perturb a random generator for b. This
is the role of the coarbitrary function.
Coarbitrary instances can be written using the perturbGen function.
Members
coarbitrary :: forall r. t -> Gen r -> Gen r
Instances
Coarbitrary BooleanCoarbitrary NumberCoarbitrary IntCoarbitrary StringCoarbitrary CharCoarbitrary UnitCoarbitrary Ordering(Coarbitrary a) => Coarbitrary (Array a)(Arbitrary a, Coarbitrary b) => Coarbitrary (a -> b)(Coarbitrary a, Coarbitrary b) => Coarbitrary (Tuple a b)(Coarbitrary a) => Coarbitrary (Maybe a)(Coarbitrary a, Coarbitrary b) => Coarbitrary (Either a b)(Coarbitrary a) => Coarbitrary (List a)(Coarbitrary a) => Coarbitrary (Identity a)(Coarbitrary a) => Coarbitrary (Lazy a)
Re-exports from Test.StrongCheck.LCG
- Modules
- Test.
StrongCheck - Test.
StrongCheck. Arbitrary - Test.
StrongCheck. Data. AlphaNumString - Test.
StrongCheck. Data. ApproxNumber - Test.
StrongCheck. Data. ArbBoundedEnum - Test.
StrongCheck. Data. ArbDateTime - Test.
StrongCheck. Data. Negative - Test.
StrongCheck. Data. NonZero - Test.
StrongCheck. Data. Positive - Test.
StrongCheck. Data. Signum - Test.
StrongCheck. Gen - Test.
StrongCheck. LCG - Test.
StrongCheck. Landscape - Test.
StrongCheck. Perturb