1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Test unions.

This commit is contained in:
Rob Rix 2015-12-14 18:13:19 -05:00
parent 62a4327bda
commit 4fd12e7223

View File

@ -16,6 +16,10 @@ spec = do
it "should return those elements in either a or b" $
Map.union a b `shouldBe` (Map.fromList $ ("a", 1) : Map.toList b)
describe "unions" $ do
it "is the union of multiple maps" $
Map.unions [ a, b ] `shouldBe` Map.union a b
describe "intersectionWith" $ do
it "should return those elements in both a and b, combined with a function" $
Map.intersectionWith (+) a b `shouldBe` (Map.fromList [ ("b", 4), ("c", 6) ])