1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Add a spec testing difference.

This commit is contained in:
Rob Rix 2015-12-14 17:43:49 -05:00
parent 205a885305
commit aebf6dd488

View File

@ -2,3 +2,9 @@ module OrderedMapSpec where
import Data.Map as Map
orderedMapSpec :: IO ()
orderedMapSpec = hspec $ do
describe "OrderedMap" $ do
describe "difference" $ do
it "should return those elements of a not in b" $
Map.difference (Map.fromList [ ("a", 1), ("b", 2), ("c", 3) ]) (Map.fromList [ ("b", 2), ("c", 3), ("d", 4) ]) `shouldBe` (Map.fromList [ ("a", 1) ])