on master help sign in
Test lazy ASCII decoding

--HG-- extra : convert_revision : fffee4766624c5d22da507d42edf45a382b6fff4

commitbbdc907fb959422d14729cec45171de541256f81 authorBryan O'Sullivan <bos@serpentine.com> dateSun 29 Aug 2010, 17:50 (16 years ago) parent1fd4770
1 file changed+3
tests/Properties.hs+3
tests/Properties.hs+3
@@ -71,6 +71,8 @@ tl_from_to_strict = (TL.fromStrict . TL.toStrict) `eq` id
7171
7272t_ascii t = E.decodeASCII (E.encodeUtf8 a) == a
7373 where a = T.map (\c -> chr (ord c `mod` 128)) t
74+tl_ascii t = EL.decodeASCII (EL.encodeUtf8 a) == a
75+ where a = TL.map (\c -> chr (ord c `mod` 128)) t
7476t_utf8 = forAll genUnicode $ (E.decodeUtf8 . E.encodeUtf8) `eq` id
7577tl_utf8 = forAll genUnicode $ (EL.decodeUtf8 . EL.encodeUtf8) `eq` id
7678t_utf16LE = forAll genUnicode $ (E.decodeUtf16LE . E.encodeUtf16LE) `eq` id
@@ -783,6 +785,7 @@ tests = [
783785
784786 testGroup "transcoding" [
785787 testProperty "t_ascii" t_ascii,
788+ testProperty "tl_ascii" tl_ascii,
786789 testProperty "t_utf8" t_utf8,
787790 testProperty "tl_utf8" tl_utf8,
788791 testProperty "t_utf16LE" t_utf16LE,