1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00
semantic/test/Data/Semigroup/App/Spec.hs
2018-10-31 15:47:30 -04:00

21 lines
540 B
Haskell

module Data.Semigroup.App.Spec where
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)