tasty-quickcheck-laws-0.0.1: Pre-built tasty trees for checking lawful class properties using QuickCheck

Copyright2018 Automattic Inc.
LicenseGPL-3
MaintainerNathan Bloomfield (nbloomf@gmail.com)
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Test.Tasty.QuickCheck.Laws.Monoid

Contents

Description

 
Synopsis

Documentation

testMonoidLaws :: (Monoid a, Eq a, Show a, Arbitrary a, Typeable a) => Proxy a -> TestTree Source #

Constructs a TestTree checking that the Monoid class laws hold for a.

Monoid Laws

testMonoidLawIdentity :: (Monoid a, Eq a, Show a, Arbitrary a) => Proxy a -> TestTree Source #

mappend mempty a === mappend a mempty === a

testMonoidLawAssociative :: (Monoid a, Eq a, Show a, Arbitrary a) => Proxy a -> TestTree Source #

mappend (mappend a b) c === mappend a (mappend b c)