2016-07-26 10:56:52 +03:00
|
|
|
module Data.Mergeable.Spec where
|
2016-07-26 10:58:14 +03:00
|
|
|
|
2016-07-26 11:02:52 +03:00
|
|
|
import Data.Functor.Identity
|
|
|
|
import Data.Mergeable
|
2016-07-26 10:58:14 +03:00
|
|
|
import Prologue
|
|
|
|
import Test.Hspec
|
2016-07-26 11:02:52 +03:00
|
|
|
import Test.Hspec.QuickCheck
|
2016-07-26 10:58:14 +03:00
|
|
|
|
|
|
|
spec :: Spec
|
2016-07-26 11:02:52 +03:00
|
|
|
spec = do
|
2016-07-26 11:04:24 +03:00
|
|
|
sequenceAltLaws
|
|
|
|
|
|
|
|
sequenceAltLaws :: Spec
|
|
|
|
sequenceAltLaws = do
|
2016-07-26 11:02:52 +03:00
|
|
|
describe "sequenceAlt" $ do
|
|
|
|
prop "identity" $
|
|
|
|
\ a -> sequenceAlt (fmap Just a) `shouldBe` Just (a :: [Char])
|