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

Safe Haskell | None
Language | Haskell2010

Test.Validity.Ord

Description

Ord properties

You will need `TypeApplications` to use these.

Synopsis

- ordSpecOnGen :: forall a. (Show a, Eq a, Ord a, Typeable a) => Gen a -> String -> (a -> [a]) -> Spec
- ordSpecOnValid :: forall a. (Show a, Ord a, Typeable a, GenValid a) => Spec
- ordSpecOnInvalid :: forall a. (Show a, Ord a, Typeable a, GenInvalid a) => Spec
- ordSpec :: forall a. (Show a, Ord a, Typeable a, GenUnchecked a) => Spec
- ordSpecOnArbitrary :: forall a. (Show a, Ord a, Typeable a, Arbitrary a) => Spec

# 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