Commits

Nicolas Pouillard committed e719bee

Properties: add a prop, reveal a bug in unstreamChunks.

Comments (0)

Files changed (1)

tests/Properties.hs

 prop_T_reverse_stream t  = (S.reverse . S.reverseStream) t == t
 prop_T_singleton c       = [c] == (T.unpack . T.singleton) c
 prop_TL_singleton c      = [c] == (TL.unpack . TL.singleton) c
+prop_TL_unstreamChunks x = f 11 x == f 1000 x
+    where f n = SL.unstreamChunks n . S.streamList
 
 prop_T_ascii t           = E.decodeASCII (E.encodeUtf8 a) == a
     where a            = T.map (\c -> chr (ord c `mod` 128)) t
   ("prop_T_reverse_stream", mytest prop_T_reverse_stream),
   ("prop_T_singleton", mytest prop_T_singleton),
   ("prop_TL_singleton", mytest prop_TL_singleton),
+  ("prop_TL_unstreamChunks", mytest prop_TL_unstreamChunks),
 
   ("prop_T_ascii", mytest prop_T_ascii),
   ("prop_T_utf8", mytest prop_T_utf8),