on master help sign in
Test fromChunks and toChunks on lazy Text

--HG-- extra : convert_revision : d325ea84d81689cae89d99654a490adc559ad1d1

commitd91636c3d8b3d6e1c144f539f98d50267dfbc638 authorBryan O'Sullivan <bos@serpentine.com> dateFri 6 Mar 2009, 07:22 (18 years ago) parentd8b8828
1 file changed+2
tests/Properties.hs+2
tests/Properties.hs+2
@@ -44,6 +44,7 @@ prop_T_singleton c = [c] == (T.unpack . T.singleton) c
4444prop_TL_singleton c = [c] == (TL.unpack . TL.singleton) c
4545prop_TL_unstreamChunks x = f 11 x == f 1000 x
4646 where f n = SL.unstreamChunks n . S.streamList
47+prop_TL_chunk_unchunk = (TL.fromChunks . TL.toChunks) `eq` id
4748
4849prop_T_ascii t = E.decodeASCII (E.encodeUtf8 a) == a
4950 where a = T.map (\c -> chr (ord c `mod` 128)) t
@@ -342,6 +343,7 @@ tests = [
342343 ("prop_T_singleton", mytest prop_T_singleton),
343344 ("prop_TL_singleton", mytest prop_TL_singleton),
344345 ("prop_TL_unstreamChunks", mytest prop_TL_unstreamChunks),
346+ ("prop_TL_chunk_unchunk", mytest prop_TL_chunk_unchunk),
345347
346348 ("prop_T_ascii", mytest prop_T_ascii),
347349 ("prop_T_utf8", mytest prop_T_utf8),