genvalidity-hspec-1.0.0.0: Standard spec's for GenValidity instances
Safe HaskellNone
LanguageHaskell2010

Test.Validity.Eq

Description

Eq properties

You will need TypeApplications to use these.

Synopsis

Documentation

eqSpec :: forall a. (Show a, Eq a, Typeable a, GenValid a) => Spec Source #

Standard test spec for properties of Eq instances for valid values

Example usage:

eqSpec @Int

eqSpecOnArbitrary :: forall a. (Show a, Eq a, Typeable a, Arbitrary a) => Spec Source #

Standard test spec for properties of Eq instances for arbitrary values

Example usage:

eqSpecOnArbitrary @Int

eqSpecOnGen :: forall a. (Show a, Eq a, Typeable a) => Gen a -> String -> (a -> [a]) -> Spec Source #

Standard test spec for properties of Eq instances for values generated by a given generator (and name for that generator).

Example usage:

eqSpecOnGen ((* 2) <$> genValid @Int) "even"