genvalidity-sydtest-0.0.0.0: Standard properties for functions on `Validity` types for the sydtest framework
Safe HaskellNone
LanguageHaskell2010

Test.Syd.Validity.Monoid

Description

Monoid properties

You will need TypeApplications to use these.

Synopsis

Documentation

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

Standard test spec for properties of Monoid instances for valid values

Example usage:

monoidSpecOnValid @[Double]

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

Standard test spec for properties of Monoid instances for unchecked values

Example usage:

monoidSpec @[Int]

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

Standard test spec for properties of Monoid instances for arbitrary values

Example usage:

monoidSpecOnArbitrary @[Int]

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

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

Example usage:

monoidSpecOnGen (pure "a") "singleton list of 'a'"