genvalidity-sydtest-0.0.0.0: Standard properties for functions on `Validity` types for the sydtest framework
Safe HaskellNone
LanguageHaskell2010

Test.Syd.Validity.GenRelativeValidity

Description

Tests for GenRelativeValidity instances

You will need TypeApplications to use these.

Synopsis

Documentation

genRelativeValiditySpec :: forall a b. (Typeable a, Show a, Show b, GenUnchecked b, GenValid b, GenRelativeValid a b, GenRelativeInvalid a b) => Spec Source #

A Spec that specifies that genValidFor and genInvalidFor work as intended.

In general it is a good idea to add this spec to your test suite if you write a custom implementation of genValidFor or genInvalidFor.

Example usage:

relativeGenValiditySpec @MyDataFor @MyOtherData

genRelativeValidGeneratesValid :: forall a b. (Show a, Show b, GenValid b, GenRelativeValid a b) => Property Source #

genValidFor b only generates values that satisfy isValidFor b

genRelativeInvalidGeneratesInvalid :: forall a b. (Show a, Show b, GenUnchecked b, GenRelativeInvalid a b) => Property Source #

genInvalidFor b only generates values that do not satisfy isValidFor b