| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Validity.GenRelativeValidity
Description
Tests for GenRelativeValidity instances
You will need TypeApplications to use these.
- genRelativeValiditySpec :: forall a b. (Typeable a, Typeable b, Show a, Show b, GenValid b, GenRelativeValid a b, GenRelativeInvalid a b) => Spec
- genRelativeValidSpec :: forall a b. (Typeable a, Typeable b, Show a, Show b, GenValid a, GenValid b, RelativeValidity a b, GenRelativeValid a b) => Spec
- genRelativeInvalidSpec :: forall a b. (Typeable a, Typeable b, Show a, Show b, GenValid a, GenValid b, RelativeValidity a b, GenRelativeInvalid a b) => Spec
- genRelativeValidGeneratesValid :: forall a b. (Show a, Show b, GenValid b, RelativeValidity a b, GenRelativeValid a b) => Property
- genRelativeInvalidGeneratesInvalid :: forall a b. (Show a, Show b, GenUnchecked b, RelativeValidity a b, GenRelativeInvalid a b) => Property
Documentation
genRelativeValiditySpec :: forall a b. (Typeable a, Typeable b, Show a, Show 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
genRelativeValidSpec :: forall a b. (Typeable a, Typeable b, Show a, Show b, GenValid a, GenValid b, RelativeValidity a b, GenRelativeValid a b) => Spec Source #
genRelativeInvalidSpec :: forall a b. (Typeable a, Typeable b, Show a, Show b, GenValid a, GenValid b, RelativeValidity a b, GenRelativeInvalid a b) => Spec Source #
genRelativeValidGeneratesValid :: forall a b. (Show a, Show b, GenValid b, RelativeValidity a 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, RelativeValidity a b, GenRelativeInvalid a b) => Property Source #
genInvalidFor b only generates values that do not satisfy isValidFor b