genvalidity-hspec-0.7.0.4: Standard spec's for GenValidity instances

Safe Haskell | None
Language | Haskell2010

Test.Validity.Eq

Description

Eq properties

You will need `TypeApplications` to use these.

Synopsis

- eqSpecOnValid :: forall a. (Show a, Eq a, Typeable a, GenValid a) => Spec
- eqSpecOnInvalid :: forall a. (Show a, Eq a, Typeable a, GenInvalid a) => Spec
- eqSpec :: forall a. (Show a, Eq a, Typeable a, GenUnchecked a) => Spec
- eqSpecOnArbitrary :: forall a. (Show a, Eq a, Typeable a, Arbitrary a) => Spec
- eqSpecOnGen :: forall a. (Show a, Eq a, Typeable a) => Gen a -> String -> (a -> [a]) -> Spec

# Documentation

eqSpecOnValid :: 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:

    eqSpecOnValid @Double

eqSpecOnInvalid :: forall a. (Show a, Eq a, Typeable a, GenInvalid a) => Spec Source #

Standard test spec for properties of Eq instances for invalid values

Example usage:

    eqSpecOnInvalid @Double

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

Standard test spec for properties of Eq instances for unchecked 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"