Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
genvalidity-hspec Test.Validity No documentation available.
-
genvalidity-hspec Test.Validity No documentation available.
arbitraryGeneratesOnlyValid :: (Show a, Validity a, Arbitrary a) => Propertygenvalidity-hspec Test.Validity.Arbitrary arbitrary only generates valid data
arbitraryGeneratesOnlyValid @Int
module Test.Validity.
GenValidity Tests for GenValidity instances You will need TypeApplications to use these.
genGeneratesInvalid :: (Show a, Validity a) => Gen a -> Propertygenvalidity-hspec Test.Validity.GenValidity The given generator generates only invalid data points
genGeneratesValid :: (Show a, Validity a) => Gen a -> Propertygenvalidity-hspec Test.Validity.GenValidity The given generator generates only valid data points
genValidGeneratesValid :: (Show a, GenValid a) => Propertygenvalidity-hspec Test.Validity.GenValidity genValid only generates valid data
genValidGeneratesValid @()
genValidGeneratesValid @Bool
genValidGeneratesValid @Ordering
genValidGeneratesValid @Char
genValidGeneratesValid @Int
genValidGeneratesValid @Float
genValidGeneratesValid @Double
genValidGeneratesValid @Integer
genValidGeneratesValid @(Maybe Int)
genValidGeneratesValid @[Int]
genValidSpec :: (Typeable a, Show a, GenValid a) => Specgenvalidity-hspec Test.Validity.GenValidity A Spec that specifies that genValid only generates valid data. In general it is a good idea to add this spec to your test suite if you write a custom implementation of genValid. Example usage:
genValidSpec @Int
-
Monoid properties You will need TypeApplications to use these.
monoidSpec :: (Show a, Eq a, Monoid a, Typeable a, GenValid a) => Specgenvalidity-hspec Test.Validity.Monoid Standard test spec for properties of Monoid instances for valid values Example usage:
monoidSpec @[Int]