on master help sign in
Improve test coverage
74092bbBryan O'Sullivan
tests/Properties.hs+4
@@ -205,6 +205,7 @@ t_null = null `eqP` T.null
205tl_null = null `eqP` TL.null
205tl_null = null `eqP` TL.null
206s_length = length `eqP` S.length
206s_length = length `eqP` S.length
207sf_length p = (length . L.filter p) `eqP` (S.length . S.filter p)
207sf_length p = (length . L.filter p) `eqP` (S.length . S.filter p)
208+sl_length = (fromIntegral . length) `eqP` SL.length
208t_length = length `eqP` T.length
209t_length = length `eqP` T.length
209tl_length = L.genericLength `eqP` TL.length
210tl_length = L.genericLength `eqP` TL.length
210t_compareLength t = (compare (T.length t)) `eq` T.compareLength t
211t_compareLength t = (compare (T.length t)) `eq` T.compareLength t
@@ -446,6 +447,7 @@ t_findContains (NotEmpty s) = unsquare (all (T.isPrefixOf s . snd) . T.find s .
446 T.intercalate s)
447 T.intercalate s)
447tl_findContains (NotEmpty s) = unsquare (all (TL.isPrefixOf s . snd) .
448tl_findContains (NotEmpty s) = unsquare (all (TL.isPrefixOf s . snd) .
448 TL.find s . TL.intercalate s)
449 TL.find s . TL.intercalate s)
450+sl_filterCount c = (L.genericLength . L.filter (==c)) `eqP` SL.countChar c
449t_findCount s = (L.length . T.find s) `eq` T.count s
451t_findCount s = (L.length . T.find s) `eq` T.count s
450tl_findCount s = (L.genericLength . TL.find s) `eq` TL.count s
452tl_findCount s = (L.genericLength . TL.find s) `eq` TL.count s
451
453
@@ -752,6 +754,7 @@ tests = [
752 testProperty "tl_null" tl_null,
754 testProperty "tl_null" tl_null,
753 testProperty "s_length" s_length,
755 testProperty "s_length" s_length,
754 testProperty "sf_length" sf_length,
756 testProperty "sf_length" sf_length,
757+ testProperty "sl_length" sl_length,
755 testProperty "t_length" t_length,
758 testProperty "t_length" t_length,
756 testProperty "tl_length" tl_length,
759 testProperty "tl_length" tl_length,
757 testProperty "t_compareLength" t_compareLength,
760 testProperty "t_compareLength" t_compareLength,
@@ -935,6 +938,7 @@ tests = [
935 testProperty "tl_findAppendId" tl_findAppendId,
938 testProperty "tl_findAppendId" tl_findAppendId,
936 testProperty "t_findContains" t_findContains,
939 testProperty "t_findContains" t_findContains,
937 testProperty "tl_findContains" tl_findContains,
940 testProperty "tl_findContains" tl_findContains,
941+ testProperty "sl_filterCount" sl_filterCount,
938 testProperty "t_findCount" t_findCount,
942 testProperty "t_findCount" t_findCount,
939 testProperty "tl_findCount" tl_findCount,
943 testProperty "tl_findCount" tl_findCount,
940 testProperty "t_split_split" t_split_split,
944 testProperty "t_split_split" t_split_split,