packages feed

msgpack-types-0.3.2: test/Data/MessagePack/Types/AssocSpec.hs

{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Trustworthy         #-}
module Data.MessagePack.Types.AssocSpec where

import           Data.MessagePack.Types                (Assoc (..))
import           Test.Hspec                            (Spec, describe, it,
                                                        shouldBe)
import           Test.QuickCheck                       (Arbitrary (..),
                                                        property)
import           Test.QuickCheck.Instances.MessagePack ()

spec :: Spec
spec =
    describe "Assoc" $
        it "has a working Read/Show implementation"
            $ property
            $ \(x :: Assoc [(Int, Int)]) -> read (show x) `shouldBe` x