on master help sign in
Fix append test to actually use append

The test now fails, as expected. Apparently "append" is not working as intended, as it sets *both* the duplicate fields to the same value (right).

commitf59a7221124e1a65d0bc6a4c1957dfc8dd0f0c86 authorSridhar Ratnakumar <srid@srid.ca> dateSat 22 Aug 2020, 14:16 (6 years ago) parent0d390d9
1 file changed+3−2
test/JRecSpec.hs+3−2
test/JRecSpec.hs+3−2
@@ -44,10 +44,11 @@ spec = do
4444 Rec (#a := 1) `append` Rec (#b := 2)
4545 `shouldBe` Rec (#a := 1, #b := 2)
4646 it "append with duplicates" $ do
47+ pendingWith "append is overwriting all duplicate fields with same value"
4748 let r1 = Rec (#b := 5, #a := 6)
4849 r2 = Rec (#c := 7, #a := 8)
49− r1 `union` r2
50− `shouldBe` Rec (#b := 5, #a := 8, #c := 7, #a := 8)
50+ r1 `append` r2
51+ `shouldBe` Rec (#b := 5, #a := 6, #c := 7, #a := 8)
5152 describe "union" $ do
5253 it "simple union" $ do
5354 Rec (#a := 1) `union` Rec (#b := 2)