1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00
semantic/test/Data/Semigroup/App/Spec.hs

21 lines
547 B
Haskell
Raw Normal View History

module Data.Semigroup.App.Spec (spec) where
2018-10-31 22:47:30 +03:00
import SpecHelpers
import Data.Semigroup.App
spec :: Spec
spec = do
describe "App" $
prop "should be associative" $
\a b c -> a <> (b <> c) == (a <> b) <> (c :: App Maybe Integer)
describe "AppMerge" $ do
prop "should be associative" $
\ a b c -> a <> (b <> c) == (a <> b) <> (c :: AppMerge Maybe String)
prop "identity/left" $
\ a -> mempty <> a == (a :: AppMerge Maybe String)
prop "identity/right" $
\ a -> a <> mempty == (a :: AppMerge Maybe String)