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

Test.Syd.Validity.RelativeValidity

Description

Tests for RelativeValidity instances

You will need TypeApplications to use these.

Synopsis

Documentation

relativeValiditySpec :: forall a b. (Typeable a, Typeable b, Show a, Show b, Validity a, Validity b, GenUnchecked a, GenUnchecked b, RelativeValidity a b) => Spec Source #

A Spec that specifies that isValidFor implies isValid

In general it is a good idea to add this spec to your test suite if the a and b in RelativeValidity a b also have a Validity instance.

Example usage:

relativeValiditySpec @MyDataFor @MyOtherData

relativeValidityImpliesValidA :: forall a b. (Show a, Show b, Validity a, GenUnchecked a, GenUnchecked b, RelativeValidity a b) => Property Source #

isValidFor a b implies isValid a for all b

relativeValidityImpliesValidB :: forall a b. (Show a, Show b, Validity b, GenUnchecked a, GenUnchecked b, RelativeValidity a b) => Property Source #

isValidFor a b implies isValid b for all a