From 595293e1a5c8c2e783cd589ad6c9157debaa10ff Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:02:46 -0500 Subject: [PATCH] Actually test the property. --- test/SplitSpec.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 2549c1f4e..80d2ca2d3 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -122,8 +122,9 @@ spec = do prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] - prop "appends onto open rows" $ forAll ((arbitrary :: Gen Row) `suchThat` isOpen) $ - \ a -> True + prop "appends onto open rows" $ forAll ((arbitrary `suchThat` isOpen) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isOpen)) $ + \ (a@(Row (Line ac1 as1) (Line bc1 bs1)), b@(Row (Line ac2 as2) (Line bc2 bs2))) -> + adjoin2 [ a ] b `shouldBe` [ Row (Line (ac1 || ac2) $ as1 ++ as2) (Line (bc1 || bc2) $ bs1 ++ bs2) ] it "appends elements onto incomplete lines" $ adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe`