genvalidity-hspec-1.0.0.3: Standard spec's for GenValidity instances
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Validity.Ord

Description

Ord properties

You will need TypeApplications to use these.

Synopsis

Documentation

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

ordSpec @Int

ordSpecOnGen :: forall a. (Show 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"

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