quickCheck -package:QuickCheck
Perform an efficient check on a string, to quickly determine if the
string is in a particular normalization form.
A
Nothing result indicates that a definite answer could not be
determined quickly, and a more thorough check is required, e.g. with
isNormalized. The user may have to convert the string to its
normalized form and compare the results.
A result of
Just True or
Just False
indicates that the string definitely is, or is not, in the given
normalization form.
Tests a property and prints the results to
stdout.
By default up to 100 tests are performed, which may not be enough to
find all bugs. To run more tests, use
withMaxSuccess.
If you want to get the counterexample as a Haskell value, rather than
just printing it, try the
quickcheck-with-counterexamples
package.
Create a Hedgehog
Gen from a QuickCheck
Gen.
By default the
Gen created will not have any shrinking, you can
use
Gen.shrink if you have a shrink function which you
would like to apply.
This module allows to use QuickCheck properties in tasty.
Provides Arbitrary instances for protocol types.
QuickCheck related utilities.
Use QuickCheck generators and
Arbitrary instances with
Hedgehog.
Servant.QuickCheck provides utilities related to using
QuickCheck over an API. Rather than specifying properties that
individual handlers must satisfy, you can state properties that ought
to hold true of the entire API.
While the API must be described with
servant types, the
server being tested itself need not be implemented with
servant-server (or indeed, written in Haskell).
The documentation of the
Useful predicates sections is meant to
serve as a set of helpful pointers for learning more about best
practices concerning REST APIs.
Functions for introducing QuickCheck tests into a Sandwich test tree.
Modelled after Hspec's version.
Documentation can be found
here.
Common quickcheck instances
QuickCheck instances.
The goal is to supply QuickCheck instances for types provided by the
Haskell Platform.
Since all of these instances are provided as orphans, I recommend that
you do not use this library within another library module, so that you
don't impose these instances on down-stream consumers of your code.
QuickCheck common typeclasses
This library provides QuickCheck properties to ensure that typeclass
instances adhere to the set of laws that they are supposed to. There
are other libraries that do similar things, such as
`genvalidity-hspec` and
checkers. This library differs from
other solutions by not introducing any new typeclasses that the user
needs to learn.
Note: on GHC < 8.5, this library uses the higher-kinded
typeclasses (
Data.Functor.Classes.Show1,
Data.Functor.Classes.Eq1,
Data.Functor.Classes.Ord1,
etc.), but on GHC >= 8.5, it uses `-XQuantifiedConstraints` to
express these constraints more cleanly.
Alternative arbitrary instance for Text
The usual Arbitrary instance for Text (in
quickcheck-instances)
only has single-byte instances and so isn't an ideal representation of
a valid UTF-8 character. This package has generators for one-, two-
and three-byte UTF-8 characters (all that are currently in use).
QuickCheck common typeclasses from `base`
This libary is a minimal variant of `quickcheck-classes` that only
provides laws for typeclasses from
base. The main purpose of
splitting this out is so that
primitive can depend on
`quickcheck-classes-base` in its test suite, avoiding the circular
dependency that arises if `quickcheck-classes` is used instead.
This library provides QuickCheck properties to ensure that typeclass
instances adhere to the set of laws that they are supposed to. There
are other libraries that do similar things, such as
`genvalidity-hspec` and
checkers. This library differs from
other solutions by not introducing any new typeclasses that the user
needs to learn.
Note: on GHC < 8.5, this library uses the higher-kinded
typeclasses (
Data.Functor.Classes.Show1,
Data.Functor.Classes.Eq1,
Data.Functor.Classes.Ord1,
etc.), but on GHC >= 8.5, it uses `-XQuantifiedConstraints` to
express these constraints more cleanly.
HUnit like assertions for QuickCheck
Library with convenient assertions for QuickCheck properties like in
HUnit
Generator and shrink functions for testing
Unicode-related software.
Generator and shrink functions for testing Unicode-related software.