on master help sign in
Properties: add a prop, reveal a bug in unstreamChunks.

--HG-- extra : convert_revision : 8d2bfdf67bfe19905cc39b2b7d261a3387b30919

commit7d48537992e67d0d937c5da7cce2eb17c104760e authorNicolas Pouillard <nicolas.pouillard@gmail.com> dateThu 5 Mar 2009, 15:03 (18 years ago) parent2623a3f
1 file changed+3
tests/Properties.hs+3
tests/Properties.hs+3
@@ -42,6 +42,8 @@ prop_TL_stream_unstream = (SL.unstream . SL.stream) `eq` id
4242prop_T_reverse_stream t = (S.reverse . S.reverseStream) t == t
4343prop_T_singleton c = [c] == (T.unpack . T.singleton) c
4444prop_TL_singleton c = [c] == (TL.unpack . TL.singleton) c
45+prop_TL_unstreamChunks x = f 11 x == f 1000 x
46+ where f n = SL.unstreamChunks n . S.streamList
4547
4648prop_T_ascii t = E.decodeASCII (E.encodeUtf8 a) == a
4749 where a = T.map (\c -> chr (ord c `mod` 128)) t
@@ -330,6 +332,7 @@ tests = [
330332 ("prop_T_reverse_stream", mytest prop_T_reverse_stream),
331333 ("prop_T_singleton", mytest prop_T_singleton),
332334 ("prop_TL_singleton", mytest prop_TL_singleton),
335+ ("prop_TL_unstreamChunks", mytest prop_TL_unstreamChunks),
333336
334337 ("prop_T_ascii", mytest prop_T_ascii),
335338 ("prop_T_utf8", mytest prop_T_utf8),