@@ -7,8 +7,8 @@ import Test.Hspec
77spec :: Spec
88spec = do
99 it "polymorphic" $ do
10− (Rec (#u := True, #a := 5, #a := 2, #b := 6) & #u .~ 5)
11− `shouldBe` Rec (#u := 5, #a := 5, #a := 2, #b := 6)
10+ (Rec (#u := True, #a := 5, #b := 6, #a := 2 ) & #u .~ 5)
11+ `shouldBe` Rec (#u := 5, #a := 5, #b := 6, #a := 2)
1212 it "show" $ do
1313 show (Rec ()) `shouldBe` "{}"
1414 show (Rec (#foo := True)) `shouldBe` "{foo = True}"
@@ -58,6 +58,12 @@ spec = do
5858 r2 = Rec (#c := 7, #a := 8)
5959 r1 `union` r2
6060 `shouldBe` Rec (#b := 5, #a := 6, #c := 7)
61+ describe "insert" $ do
62+ it "simple insert" $ do
63+ (#a := 1) `insert` Rec (#b := 2, #c := 3)
64+ `shouldBe` Rec (#a := 1, #b := 2, #c := 3)
65+ it "duplicate insert should be disallowed" $ do
66+ pendingWith "TODO"
6167-- describe "insertOrSet" $ do
6268-- it "distinct" $ do
6369-- insertOrSet (#a := 1) (Rec (#b := 2, #c := 3))