on master help sign in
Make some find tests more useful

--HG-- extra : convert_revision : 28045e90ebea8c437bbf69a6d0c160e1d3c354d0

commit24324f202a0c8358ffeaaa676d6aebc4633dd89a authorBryan O'Sullivan <bos@serpentine.com> dateFri 23 Jul 2010, 20:49 (16 years ago) parent3128ac0
1 file changed+6−2
tests/Properties.hs+6−2
tests/Properties.hs+6−2
@@ -423,8 +423,12 @@ t_inits = L.inits `eqP` (map unpackS . T.inits)
423423tl_inits = L.inits `eqP` (map unpackS . TL.inits)
424424t_tails = L.tails `eqP` (map unpackS . T.tails)
425425tl_tails = L.tails `eqP` (map unpackS . TL.tails)
426−t_findAppendId (NotEmpty s) t = all (==t) $ map (uncurry T.append) (T.find s t)
427−tl_findAppendId (NotEmpty s) t = all (==t) $ map (uncurry TL.append) (TL.find s t)
426+t_findAppendId (NotEmpty s) = unsquare $ \ts ->
427+ let t = T.intercalate s ts
428+ in all (==t) $ map (uncurry T.append) (T.find s t)
429+tl_findAppendId (NotEmpty s) = unsquare $ \ts ->
430+ let t = TL.intercalate s ts
431+ in all (==t) $ map (uncurry TL.append) (TL.find s t)
428432t_findContains (NotEmpty s) = unsquare (all (T.isPrefixOf s . snd) . T.find s .
429433 T.intercalate s)
430434tl_findContains (NotEmpty s) = unsquare (all (TL.isPrefixOf s . snd) .