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

Test the asymmetry of intersectionWith.

This commit is contained in:
Rob Rix 2015-12-14 18:20:21 -05:00
parent a357c155f8
commit 9604238c02

View File

@ -30,6 +30,9 @@ spec = 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) ])
it "is asymmetrical" $ do
Map.intersectionWith (-) a b `shouldNotBe` Map.intersectionWith (-) b a
describe "keys" $ do
it "should return all the keys in a map" $
Map.keys a `shouldBe` [ "a", "b", "c" ]