Hoogle Search

Within LTS Haskell 24.65 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. package genvalidity-sydtest

    Standard properties for functions on `Validity` types for the sydtest framework Standard properties for functions on Validity types for the sydtest framework

  2. module Test.Syd.Validity

    To use the Spec functions in this module, you will need TypeApplications. The most interesting functions in this module for most uses are:

  3. arbitraryGeneratesOnlyValid :: (Show a, Validity a, Arbitrary a) => Property

    genvalidity-sydtest Test.Syd.Validity

    arbitrary only generates valid data

    arbitraryGeneratesOnlyValid @Int
    

  4. forAllValid :: (Show a, GenValid a, Testable prop) => (a -> prop) -> Property

    genvalidity-sydtest Test.Syd.Validity

    No documentation available.

  5. genGeneratesValid :: (Show a, Validity a) => Gen a -> Property

    genvalidity-sydtest Test.Syd.Validity

    The given generator generates only valid data points

  6. genValidGeneratesValid :: (Show a, GenValid a) => Property

    genvalidity-sydtest Test.Syd.Validity

    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]
    

  7. genValidSpec :: forall a (outers :: [Type]) . (Typeable a, Show a, GenValid a) => TestDef outers ()

    genvalidity-sydtest Test.Syd.Validity

    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
    

  8. leftIdentity :: (Show a, Eq a, GenValid a) => (b -> a -> a) -> b -> Property

    genvalidity-sydtest Test.Syd.Validity

    leftIdentity (flip ((^) :: Int -> Int -> Int)) 1
    

  9. leftIdentityOnArbitrary :: (Show a, Eq a, Arbitrary a) => (b -> a -> a) -> b -> Property

    genvalidity-sydtest Test.Syd.Validity

    leftIdentityOnArbitrary (flip ((^) :: Int -> Int -> Int)) 1
    

  10. leftIdentityOnElemWithEquality :: (b -> a -> a) -> (a -> a -> Bool) -> b -> a -> Bool

    genvalidity-sydtest Test.Syd.Validity

Page 698 of many | Previous | Next