on master help sign in
Test consing over streams
91f3628Bryan O'Sullivan
tests/Properties.hs+2
@@ -101,6 +101,7 @@ eqEP a b e w = a s == b t &&
101 n = fromIntegral w
101 n = fromIntegral w
102 s = notEmpty e
102 s = notEmpty e
103
103
104+prop_S_cons x = (x:) `eqP` (S.unstreamList . S.cons x)
104prop_T_cons x = (x:) `eqP` (T.unpack . T.cons x)
105prop_T_cons x = (x:) `eqP` (T.unpack . T.cons x)
105prop_TL_cons x = ((x:) `eqP` (TL.unpack . TL.cons x))
106prop_TL_cons x = ((x:) `eqP` (TL.unpack . TL.cons x))
106prop_T_snoc x = (++ [x]) `eqP` (T.unpack . (flip T.snoc) x)
107prop_T_snoc x = (++ [x]) `eqP` (T.unpack . (flip T.snoc) x)
@@ -272,6 +273,7 @@ tests = [
272 ("prop_T_utf32LE", mytest prop_T_utf32LE),
273 ("prop_T_utf32LE", mytest prop_T_utf32LE),
273 ("prop_T_utf32BE", mytest prop_T_utf32BE),
274 ("prop_T_utf32BE", mytest prop_T_utf32BE),
274
275
276+ ("prop_S_cons", mytest prop_S_cons),
275 ("prop_T_cons", mytest prop_T_cons),
277 ("prop_T_cons", mytest prop_T_cons),
276 ("prop_TL_cons", mytest prop_TL_cons),
278 ("prop_TL_cons", mytest prop_TL_cons),
277 ("prop_T_snoc", mytest prop_T_snoc),
279 ("prop_T_snoc", mytest prop_T_snoc),