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

Safe HaskellNone
LanguageHaskell2010

Test.Validity.Ord

Description

Ord properties

You will need TypeApplications to use these.

Synopsis

Documentation

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

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

Example usage:

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

ordSpecOnValid :: forall a. (Show a, Ord a, Typeable a, GenValid a) => Spec Source #

Standard test spec for properties of Ord instances for valid values

Example usage:

ordSpecOnValid @Double

ordSpecOnInvalid :: forall a. (Show a, Ord a, Typeable a, GenInvalid a) => Spec Source #

Standard test spec for properties of Ord instances for invalid values

Example usage:

ordSpecOnInvalid @Double

ordSpec :: forall a. (Show a, Ord a, Typeable a, GenUnchecked a) => Spec Source #

Standard test spec for properties of Ord instances for unchecked values

Example usage:

ordSpec @Int

ordSpecOnArbitrary :: forall a. (Show a, Ord a, Typeable a, Arbitrary a) => Spec Source #

Standard test spec for properties of Ord instances for arbitrary values

Example usage:

ordSpecOnArbitrary @Int