@@ -1,3 +1,5 @@
1+-- | General quicktest properties for the text library
2+--
13{-# LANGUAGE BangPatterns, FlexibleInstances, OverloadedStrings,
24 ScopedTypeVariables, TypeSynonymInstances, CPP #-}
35{-# OPTIONS_GHC -fno-enable-rewrite-rules #-}
@@ -45,7 +47,7 @@ import qualified Data.Text.UnsafeShift as U
4547import qualified System.IO as IO
4648
4749import Data.Text.Tests.QuickCheckUtils
48−import Data.Text.Tests.TestUtils
50+import Data.Text.Tests.Utils
4951import qualified Data.Text.Tests.SlowFunctions as Slow
5052
5153t_pack_unpack = (T.unpack . T.pack) `eq` id
@@ -683,420 +685,421 @@ shorten n t@(S.Stream arr off len)
683685 | n > 0 = S.Stream arr off (smaller (exactSize n) len)
684686 | otherwise = t
685687
686−tests :: [Test]
687−tests = [
688− testGroup "creation/elimination" [
689− testProperty "t_pack_unpack" t_pack_unpack,
690− testProperty "tl_pack_unpack" tl_pack_unpack,
691− testProperty "t_stream_unstream" t_stream_unstream,
692− testProperty "tl_stream_unstream" tl_stream_unstream,
693− testProperty "t_reverse_stream" t_reverse_stream,
694− testProperty "t_singleton" t_singleton,
695− testProperty "tl_singleton" tl_singleton,
696− testProperty "tl_unstreamChunks" tl_unstreamChunks,
697− testProperty "tl_chunk_unchunk" tl_chunk_unchunk,
698− testProperty "tl_from_to_strict" tl_from_to_strict
699− ],
700−
701− testGroup "transcoding" [
702− testProperty "t_ascii" t_ascii,
703− testProperty "tl_ascii" tl_ascii,
704− testProperty "t_utf8" t_utf8,
705− testProperty "t_utf8'" t_utf8',
706− testProperty "tl_utf8" tl_utf8,
707− testProperty "tl_utf8'" tl_utf8',
708− testProperty "t_utf16LE" t_utf16LE,
709− testProperty "tl_utf16LE" tl_utf16LE,
710− testProperty "t_utf16BE" t_utf16BE,
711− testProperty "tl_utf16BE" tl_utf16BE,
712− testProperty "t_utf32LE" t_utf32LE,
713− testProperty "tl_utf32LE" tl_utf32LE,
714− testProperty "t_utf32BE" t_utf32BE,
715− testProperty "tl_utf32BE" tl_utf32BE,
716− testGroup "errors" [
717− testProperty "t_utf8_err" t_utf8_err,
718− testProperty "t_utf8_err'" t_utf8_err'
719− ]
720− ],
721−
722− testGroup "instances" [
723− testProperty "s_Eq" s_Eq,
724− testProperty "sf_Eq" sf_Eq,
725− testProperty "t_Eq" t_Eq,
726− testProperty "tl_Eq" tl_Eq,
727− testProperty "s_Ord" s_Ord,
728− testProperty "sf_Ord" sf_Ord,
729− testProperty "t_Ord" t_Ord,
730− testProperty "tl_Ord" tl_Ord,
731− testProperty "t_Read" t_Read,
732− testProperty "tl_Read" tl_Read,
733− testProperty "t_Show" t_Show,
734− testProperty "tl_Show" tl_Show,
735− testProperty "t_mappend" t_mappend,
736− testProperty "tl_mappend" tl_mappend,
737− testProperty "t_mconcat" t_mconcat,
738− testProperty "tl_mconcat" tl_mconcat,
739− testProperty "t_mempty" t_mempty,
740− testProperty "tl_mempty" tl_mempty,
741− testProperty "t_IsString" t_IsString,
742− testProperty "tl_IsString" tl_IsString
743− ],
744−
745− testGroup "basics" [
746− testProperty "s_cons" s_cons,
747− testProperty "s_cons_s" s_cons_s,
748− testProperty "sf_cons" sf_cons,
749− testProperty "t_cons" t_cons,
750− testProperty "tl_cons" tl_cons,
751− testProperty "s_snoc" s_snoc,
752− testProperty "t_snoc" t_snoc,
753− testProperty "tl_snoc" tl_snoc,
754− testProperty "s_append" s_append,
755− testProperty "s_append_s" s_append_s,
756− testProperty "sf_append" sf_append,
757− testProperty "t_append" t_append,
758− testProperty "s_uncons" s_uncons,
759− testProperty "sf_uncons" sf_uncons,
760− testProperty "t_uncons" t_uncons,
761− testProperty "tl_uncons" tl_uncons,
762− testProperty "s_head" s_head,
763− testProperty "sf_head" sf_head,
764− testProperty "t_head" t_head,
765− testProperty "tl_head" tl_head,
766− testProperty "s_last" s_last,
767− testProperty "sf_last" sf_last,
768− testProperty "t_last" t_last,
769− testProperty "tl_last" tl_last,
770− testProperty "s_tail" s_tail,
771− testProperty "s_tail_s" s_tail_s,
772− testProperty "sf_tail" sf_tail,
773− testProperty "t_tail" t_tail,
774− testProperty "tl_tail" tl_tail,
775− testProperty "s_init" s_init,
776− testProperty "s_init_s" s_init_s,
777− testProperty "sf_init" sf_init,
778− testProperty "t_init" t_init,
779− testProperty "tl_init" tl_init,
780− testProperty "s_null" s_null,
781− testProperty "sf_null" sf_null,
782− testProperty "t_null" t_null,
783− testProperty "tl_null" tl_null,
784− testProperty "s_length" s_length,
785− testProperty "sf_length" sf_length,
786− testProperty "sl_length" sl_length,
787− testProperty "t_length" t_length,
788− testProperty "tl_length" tl_length,
789− testProperty "t_compareLength" t_compareLength,
790− testProperty "tl_compareLength" tl_compareLength
791− ],
792−
793− testGroup "transformations" [
794− testProperty "s_map" s_map,
795− testProperty "s_map_s" s_map_s,
796− testProperty "sf_map" sf_map,
797− testProperty "t_map" t_map,
798− testProperty "tl_map" tl_map,
799− testProperty "t_intercalate" t_intercalate,
800− testProperty "tl_intercalate" tl_intercalate,
801− testProperty "s_intersperse" s_intersperse,
802− testProperty "s_intersperse_s" s_intersperse_s,
803− testProperty "sf_intersperse" sf_intersperse,
804− testProperty "t_intersperse" t_intersperse,
805− testProperty "tl_intersperse" tl_intersperse,
806− testProperty "t_transpose" t_transpose,
807− testProperty "tl_transpose" tl_transpose,
808− testProperty "t_reverse" t_reverse,
809− testProperty "tl_reverse" tl_reverse,
810− testProperty "t_reverse_short" t_reverse_short,
811− testProperty "t_replace" t_replace,
812− testProperty "tl_replace" tl_replace,
813−
814− testGroup "case conversion" [
815− testProperty "s_toCaseFold_length" s_toCaseFold_length,
816− testProperty "sf_toCaseFold_length" sf_toCaseFold_length,
817− testProperty "t_toCaseFold_length" t_toCaseFold_length,
818− testProperty "tl_toCaseFold_length" tl_toCaseFold_length,
819− testProperty "t_toLower_length" t_toLower_length,
820− testProperty "t_toLower_lower" t_toLower_lower,
821− testProperty "tl_toLower_lower" tl_toLower_lower,
822− testProperty "t_toUpper_length" t_toUpper_length,
823− testProperty "t_toUpper_upper" t_toUpper_upper,
824− testProperty "tl_toUpper_upper" tl_toUpper_upper
688+tests :: Test
689+tests =
690+ testGroup "Properties" [
691+ testGroup "creation/elimination" [
692+ testProperty "t_pack_unpack" t_pack_unpack,
693+ testProperty "tl_pack_unpack" tl_pack_unpack,
694+ testProperty "t_stream_unstream" t_stream_unstream,
695+ testProperty "tl_stream_unstream" tl_stream_unstream,
696+ testProperty "t_reverse_stream" t_reverse_stream,
697+ testProperty "t_singleton" t_singleton,
698+ testProperty "tl_singleton" tl_singleton,
699+ testProperty "tl_unstreamChunks" tl_unstreamChunks,
700+ testProperty "tl_chunk_unchunk" tl_chunk_unchunk,
701+ testProperty "tl_from_to_strict" tl_from_to_strict
825702 ],
826703
827− testGroup "justification" [
828− testProperty "s_justifyLeft" s_justifyLeft,
829− testProperty "s_justifyLeft_s" s_justifyLeft_s,
830− testProperty "sf_justifyLeft" sf_justifyLeft,
831− testProperty "t_justifyLeft" t_justifyLeft,
832− testProperty "tl_justifyLeft" tl_justifyLeft,
833− testProperty "t_justifyRight" t_justifyRight,
834− testProperty "tl_justifyRight" tl_justifyRight,
835− testProperty "t_center" t_center,
836− testProperty "tl_center" tl_center
837− ]
838− ],
839−
840− testGroup "folds" [
841− testProperty "sf_foldl" sf_foldl,
842− testProperty "t_foldl" t_foldl,
843− testProperty "tl_foldl" tl_foldl,
844− testProperty "sf_foldl'" sf_foldl',
845− testProperty "t_foldl'" t_foldl',
846− testProperty "tl_foldl'" tl_foldl',
847− testProperty "sf_foldl1" sf_foldl1,
848− testProperty "t_foldl1" t_foldl1,
849− testProperty "tl_foldl1" tl_foldl1,
850− testProperty "t_foldl1'" t_foldl1',
851− testProperty "sf_foldl1'" sf_foldl1',
852− testProperty "tl_foldl1'" tl_foldl1',
853− testProperty "sf_foldr" sf_foldr,
854− testProperty "t_foldr" t_foldr,
855− testProperty "tl_foldr" tl_foldr,
856− testProperty "sf_foldr1" sf_foldr1,
857− testProperty "t_foldr1" t_foldr1,
858− testProperty "tl_foldr1" tl_foldr1,
859−
860− testGroup "special" [
861− testProperty "s_concat_s" s_concat_s,
862− testProperty "sf_concat" sf_concat,
863− testProperty "t_concat" t_concat,
864− testProperty "tl_concat" tl_concat,
865− testProperty "sf_concatMap" sf_concatMap,
866− testProperty "t_concatMap" t_concatMap,
867− testProperty "tl_concatMap" tl_concatMap,
868− testProperty "sf_any" sf_any,
869− testProperty "t_any" t_any,
870− testProperty "tl_any" tl_any,
871− testProperty "sf_all" sf_all,
872− testProperty "t_all" t_all,
873− testProperty "tl_all" tl_all,
874− testProperty "sf_maximum" sf_maximum,
875− testProperty "t_maximum" t_maximum,
876− testProperty "tl_maximum" tl_maximum,
877− testProperty "sf_minimum" sf_minimum,
878− testProperty "t_minimum" t_minimum,
879− testProperty "tl_minimum" tl_minimum
880− ]
881− ],
882−
883− testGroup "construction" [
884− testGroup "scans" [
885− testProperty "sf_scanl" sf_scanl,
886− testProperty "t_scanl" t_scanl,
887− testProperty "tl_scanl" tl_scanl,
888− testProperty "t_scanl1" t_scanl1,
889− testProperty "tl_scanl1" tl_scanl1,
890− testProperty "t_scanr" t_scanr,
891− testProperty "tl_scanr" tl_scanr,
892− testProperty "t_scanr1" t_scanr1,
893− testProperty "tl_scanr1" tl_scanr1
704+ testGroup "transcoding" [
705+ testProperty "t_ascii" t_ascii,
706+ testProperty "tl_ascii" tl_ascii,
707+ testProperty "t_utf8" t_utf8,
708+ testProperty "t_utf8'" t_utf8',
709+ testProperty "tl_utf8" tl_utf8,
710+ testProperty "tl_utf8'" tl_utf8',
711+ testProperty "t_utf16LE" t_utf16LE,
712+ testProperty "tl_utf16LE" tl_utf16LE,
713+ testProperty "t_utf16BE" t_utf16BE,
714+ testProperty "tl_utf16BE" tl_utf16BE,
715+ testProperty "t_utf32LE" t_utf32LE,
716+ testProperty "tl_utf32LE" tl_utf32LE,
717+ testProperty "t_utf32BE" t_utf32BE,
718+ testProperty "tl_utf32BE" tl_utf32BE,
719+ testGroup "errors" [
720+ testProperty "t_utf8_err" t_utf8_err,
721+ testProperty "t_utf8_err'" t_utf8_err'
722+ ]
894723 ],
895724
896− testGroup "mapAccum" [
897− testProperty "t_mapAccumL" t_mapAccumL,
898− testProperty "tl_mapAccumL" tl_mapAccumL,
899− testProperty "t_mapAccumR" t_mapAccumR,
900− testProperty "tl_mapAccumR" tl_mapAccumR
725+ testGroup "instances" [
726+ testProperty "s_Eq" s_Eq,
727+ testProperty "sf_Eq" sf_Eq,
728+ testProperty "t_Eq" t_Eq,
729+ testProperty "tl_Eq" tl_Eq,
730+ testProperty "s_Ord" s_Ord,
731+ testProperty "sf_Ord" sf_Ord,
732+ testProperty "t_Ord" t_Ord,
733+ testProperty "tl_Ord" tl_Ord,
734+ testProperty "t_Read" t_Read,
735+ testProperty "tl_Read" tl_Read,
736+ testProperty "t_Show" t_Show,
737+ testProperty "tl_Show" tl_Show,
738+ testProperty "t_mappend" t_mappend,
739+ testProperty "tl_mappend" tl_mappend,
740+ testProperty "t_mconcat" t_mconcat,
741+ testProperty "tl_mconcat" tl_mconcat,
742+ testProperty "t_mempty" t_mempty,
743+ testProperty "tl_mempty" tl_mempty,
744+ testProperty "t_IsString" t_IsString,
745+ testProperty "tl_IsString" tl_IsString
901746 ],
902747
903− testGroup "unfolds" [
904− testProperty "t_replicate" t_replicate,
905− testProperty "tl_replicate" tl_replicate,
906− testProperty "t_unfoldr" t_unfoldr,
907− testProperty "tl_unfoldr" tl_unfoldr,
908− testProperty "t_unfoldrN" t_unfoldrN,
909− testProperty "tl_unfoldrN" tl_unfoldrN
910− ]
911− ],
912−
913− testGroup "substrings" [
914− testGroup "breaking" [
915− testProperty "s_take" s_take,
916− testProperty "s_take_s" s_take_s,
917− testProperty "sf_take" sf_take,
918− testProperty "t_take" t_take,
919− testProperty "tl_take" tl_take,
920− testProperty "s_drop" s_drop,
921− testProperty "s_drop_s" s_drop_s,
922− testProperty "sf_drop" sf_drop,
923− testProperty "t_drop" t_drop,
924− testProperty "tl_drop" tl_drop,
925− testProperty "s_take_drop" s_take_drop,
926− testProperty "s_take_drop_s" s_take_drop_s,
927− testProperty "s_takeWhile" s_takeWhile,
928− testProperty "s_takeWhile_s" s_takeWhile_s,
929− testProperty "sf_takeWhile" sf_takeWhile,
930− testProperty "t_takeWhile" t_takeWhile,
931− testProperty "tl_takeWhile" tl_takeWhile,
932− testProperty "sf_dropWhile" sf_dropWhile,
933− testProperty "s_dropWhile" s_dropWhile,
934− testProperty "s_dropWhile_s" s_dropWhile_s,
935− testProperty "t_dropWhile" t_dropWhile,
936− testProperty "tl_dropWhile" tl_dropWhile,
937− testProperty "t_dropWhileEnd" t_dropWhileEnd,
938− testProperty "tl_dropWhileEnd" tl_dropWhileEnd,
939− testProperty "t_dropAround" t_dropAround,
940− testProperty "tl_dropAround" tl_dropAround,
941− testProperty "t_stripStart" t_stripStart,
942− testProperty "tl_stripStart" tl_stripStart,
943− testProperty "t_stripEnd" t_stripEnd,
944− testProperty "tl_stripEnd" tl_stripEnd,
945− testProperty "t_strip" t_strip,
946− testProperty "tl_strip" tl_strip,
947− testProperty "t_splitAt" t_splitAt,
948− testProperty "tl_splitAt" tl_splitAt,
949− testProperty "t_span" t_span,
950− testProperty "tl_span" tl_span,
951− testProperty "t_breakOn_id" t_breakOn_id,
952− testProperty "tl_breakOn_id" tl_breakOn_id,
953− testProperty "t_breakOn_start" t_breakOn_start,
954− testProperty "tl_breakOn_start" tl_breakOn_start,
955− testProperty "t_breakOnEnd_end" t_breakOnEnd_end,
956− testProperty "tl_breakOnEnd_end" tl_breakOnEnd_end,
957− testProperty "t_break" t_break,
958− testProperty "tl_break" tl_break,
959− testProperty "t_group" t_group,
960− testProperty "tl_group" tl_group,
961− testProperty "t_groupBy" t_groupBy,
962− testProperty "tl_groupBy" tl_groupBy,
963− testProperty "t_inits" t_inits,
964− testProperty "tl_inits" tl_inits,
965− testProperty "t_tails" t_tails,
966− testProperty "tl_tails" tl_tails
748+ testGroup "basics" [
749+ testProperty "s_cons" s_cons,
750+ testProperty "s_cons_s" s_cons_s,
751+ testProperty "sf_cons" sf_cons,
752+ testProperty "t_cons" t_cons,
753+ testProperty "tl_cons" tl_cons,
754+ testProperty "s_snoc" s_snoc,
755+ testProperty "t_snoc" t_snoc,
756+ testProperty "tl_snoc" tl_snoc,
757+ testProperty "s_append" s_append,
758+ testProperty "s_append_s" s_append_s,
759+ testProperty "sf_append" sf_append,
760+ testProperty "t_append" t_append,
761+ testProperty "s_uncons" s_uncons,
762+ testProperty "sf_uncons" sf_uncons,
763+ testProperty "t_uncons" t_uncons,
764+ testProperty "tl_uncons" tl_uncons,
765+ testProperty "s_head" s_head,
766+ testProperty "sf_head" sf_head,
767+ testProperty "t_head" t_head,
768+ testProperty "tl_head" tl_head,
769+ testProperty "s_last" s_last,
770+ testProperty "sf_last" sf_last,
771+ testProperty "t_last" t_last,
772+ testProperty "tl_last" tl_last,
773+ testProperty "s_tail" s_tail,
774+ testProperty "s_tail_s" s_tail_s,
775+ testProperty "sf_tail" sf_tail,
776+ testProperty "t_tail" t_tail,
777+ testProperty "tl_tail" tl_tail,
778+ testProperty "s_init" s_init,
779+ testProperty "s_init_s" s_init_s,
780+ testProperty "sf_init" sf_init,
781+ testProperty "t_init" t_init,
782+ testProperty "tl_init" tl_init,
783+ testProperty "s_null" s_null,
784+ testProperty "sf_null" sf_null,
785+ testProperty "t_null" t_null,
786+ testProperty "tl_null" tl_null,
787+ testProperty "s_length" s_length,
788+ testProperty "sf_length" sf_length,
789+ testProperty "sl_length" sl_length,
790+ testProperty "t_length" t_length,
791+ testProperty "tl_length" tl_length,
792+ testProperty "t_compareLength" t_compareLength,
793+ testProperty "tl_compareLength" tl_compareLength
967794 ],
968795
969− testGroup "breaking many" [
970− testProperty "t_findAppendId" t_findAppendId,
971− testProperty "tl_findAppendId" tl_findAppendId,
972− testProperty "t_findContains" t_findContains,
973− testProperty "tl_findContains" tl_findContains,
974− testProperty "sl_filterCount" sl_filterCount,
975− testProperty "t_findCount" t_findCount,
976− testProperty "tl_findCount" tl_findCount,
977− testProperty "t_splitOn_split" t_splitOn_split,
978− testProperty "tl_splitOn_split" tl_splitOn_split,
979− testProperty "t_splitOn_i" t_splitOn_i,
980− testProperty "tl_splitOn_i" tl_splitOn_i,
981− testProperty "t_split" t_split,
982− testProperty "t_split_count" t_split_count,
983− testProperty "t_split_splitOn" t_split_splitOn,
984− testProperty "tl_split" tl_split,
985− testProperty "t_chunksOf_same_lengths" t_chunksOf_same_lengths,
986− testProperty "t_chunksOf_length" t_chunksOf_length,
987− testProperty "tl_chunksOf" tl_chunksOf
796+ testGroup "transformations" [
797+ testProperty "s_map" s_map,
798+ testProperty "s_map_s" s_map_s,
799+ testProperty "sf_map" sf_map,
800+ testProperty "t_map" t_map,
801+ testProperty "tl_map" tl_map,
802+ testProperty "t_intercalate" t_intercalate,
803+ testProperty "tl_intercalate" tl_intercalate,
804+ testProperty "s_intersperse" s_intersperse,
805+ testProperty "s_intersperse_s" s_intersperse_s,
806+ testProperty "sf_intersperse" sf_intersperse,
807+ testProperty "t_intersperse" t_intersperse,
808+ testProperty "tl_intersperse" tl_intersperse,
809+ testProperty "t_transpose" t_transpose,
810+ testProperty "tl_transpose" tl_transpose,
811+ testProperty "t_reverse" t_reverse,
812+ testProperty "tl_reverse" tl_reverse,
813+ testProperty "t_reverse_short" t_reverse_short,
814+ testProperty "t_replace" t_replace,
815+ testProperty "tl_replace" tl_replace,
816+
817+ testGroup "case conversion" [
818+ testProperty "s_toCaseFold_length" s_toCaseFold_length,
819+ testProperty "sf_toCaseFold_length" sf_toCaseFold_length,
820+ testProperty "t_toCaseFold_length" t_toCaseFold_length,
821+ testProperty "tl_toCaseFold_length" tl_toCaseFold_length,
822+ testProperty "t_toLower_length" t_toLower_length,
823+ testProperty "t_toLower_lower" t_toLower_lower,
824+ testProperty "tl_toLower_lower" tl_toLower_lower,
825+ testProperty "t_toUpper_length" t_toUpper_length,
826+ testProperty "t_toUpper_upper" t_toUpper_upper,
827+ testProperty "tl_toUpper_upper" tl_toUpper_upper
828+ ],
829+
830+ testGroup "justification" [
831+ testProperty "s_justifyLeft" s_justifyLeft,
832+ testProperty "s_justifyLeft_s" s_justifyLeft_s,
833+ testProperty "sf_justifyLeft" sf_justifyLeft,
834+ testProperty "t_justifyLeft" t_justifyLeft,
835+ testProperty "tl_justifyLeft" tl_justifyLeft,
836+ testProperty "t_justifyRight" t_justifyRight,
837+ testProperty "tl_justifyRight" tl_justifyRight,
838+ testProperty "t_center" t_center,
839+ testProperty "tl_center" tl_center
840+ ]
988841 ],
989842
990− testGroup "lines and words" [
991− testProperty "t_lines" t_lines,
992− testProperty "tl_lines" tl_lines,
993− --testProperty "t_lines'" t_lines',
994− testProperty "t_words" t_words,
995− testProperty "tl_words" tl_words,
996− testProperty "t_unlines" t_unlines,
997− testProperty "tl_unlines" tl_unlines,
998− testProperty "t_unwords" t_unwords,
999− testProperty "tl_unwords" tl_unwords
1000− ]
1001− ],
1002−
1003− testGroup "predicates" [
1004− testProperty "s_isPrefixOf" s_isPrefixOf,
1005− testProperty "sf_isPrefixOf" sf_isPrefixOf,
1006− testProperty "t_isPrefixOf" t_isPrefixOf,
1007− testProperty "tl_isPrefixOf" tl_isPrefixOf,
1008− testProperty "t_isSuffixOf" t_isSuffixOf,
1009− testProperty "tl_isSuffixOf" tl_isSuffixOf,
1010− testProperty "t_isInfixOf" t_isInfixOf,
1011− testProperty "tl_isInfixOf" tl_isInfixOf,
1012−
1013− testGroup "view" [
1014− testProperty "t_stripPrefix" t_stripPrefix,
1015− testProperty "tl_stripPrefix" tl_stripPrefix,
1016− testProperty "t_stripSuffix" t_stripSuffix,
1017− testProperty "tl_stripSuffix" tl_stripSuffix,
1018− testProperty "t_commonPrefixes" t_commonPrefixes,
1019− testProperty "tl_commonPrefixes" tl_commonPrefixes
843+ testGroup "folds" [
844+ testProperty "sf_foldl" sf_foldl,
845+ testProperty "t_foldl" t_foldl,
846+ testProperty "tl_foldl" tl_foldl,
847+ testProperty "sf_foldl'" sf_foldl',
848+ testProperty "t_foldl'" t_foldl',
849+ testProperty "tl_foldl'" tl_foldl',
850+ testProperty "sf_foldl1" sf_foldl1,
851+ testProperty "t_foldl1" t_foldl1,
852+ testProperty "tl_foldl1" tl_foldl1,
853+ testProperty "t_foldl1'" t_foldl1',
854+ testProperty "sf_foldl1'" sf_foldl1',
855+ testProperty "tl_foldl1'" tl_foldl1',
856+ testProperty "sf_foldr" sf_foldr,
857+ testProperty "t_foldr" t_foldr,
858+ testProperty "tl_foldr" tl_foldr,
859+ testProperty "sf_foldr1" sf_foldr1,
860+ testProperty "t_foldr1" t_foldr1,
861+ testProperty "tl_foldr1" tl_foldr1,
862+
863+ testGroup "special" [
864+ testProperty "s_concat_s" s_concat_s,
865+ testProperty "sf_concat" sf_concat,
866+ testProperty "t_concat" t_concat,
867+ testProperty "tl_concat" tl_concat,
868+ testProperty "sf_concatMap" sf_concatMap,
869+ testProperty "t_concatMap" t_concatMap,
870+ testProperty "tl_concatMap" tl_concatMap,
871+ testProperty "sf_any" sf_any,
872+ testProperty "t_any" t_any,
873+ testProperty "tl_any" tl_any,
874+ testProperty "sf_all" sf_all,
875+ testProperty "t_all" t_all,
876+ testProperty "tl_all" tl_all,
877+ testProperty "sf_maximum" sf_maximum,
878+ testProperty "t_maximum" t_maximum,
879+ testProperty "tl_maximum" tl_maximum,
880+ testProperty "sf_minimum" sf_minimum,
881+ testProperty "t_minimum" t_minimum,
882+ testProperty "tl_minimum" tl_minimum
883+ ]
884+ ],
885+
886+ testGroup "construction" [
887+ testGroup "scans" [
888+ testProperty "sf_scanl" sf_scanl,
889+ testProperty "t_scanl" t_scanl,
890+ testProperty "tl_scanl" tl_scanl,
891+ testProperty "t_scanl1" t_scanl1,
892+ testProperty "tl_scanl1" tl_scanl1,
893+ testProperty "t_scanr" t_scanr,
894+ testProperty "tl_scanr" tl_scanr,
895+ testProperty "t_scanr1" t_scanr1,
896+ testProperty "tl_scanr1" tl_scanr1
897+ ],
898+
899+ testGroup "mapAccum" [
900+ testProperty "t_mapAccumL" t_mapAccumL,
901+ testProperty "tl_mapAccumL" tl_mapAccumL,
902+ testProperty "t_mapAccumR" t_mapAccumR,
903+ testProperty "tl_mapAccumR" tl_mapAccumR
904+ ],
905+
906+ testGroup "unfolds" [
907+ testProperty "t_replicate" t_replicate,
908+ testProperty "tl_replicate" tl_replicate,
909+ testProperty "t_unfoldr" t_unfoldr,
910+ testProperty "tl_unfoldr" tl_unfoldr,
911+ testProperty "t_unfoldrN" t_unfoldrN,
912+ testProperty "tl_unfoldrN" tl_unfoldrN
913+ ]
914+ ],
915+
916+ testGroup "substrings" [
917+ testGroup "breaking" [
918+ testProperty "s_take" s_take,
919+ testProperty "s_take_s" s_take_s,
920+ testProperty "sf_take" sf_take,
921+ testProperty "t_take" t_take,
922+ testProperty "tl_take" tl_take,
923+ testProperty "s_drop" s_drop,
924+ testProperty "s_drop_s" s_drop_s,
925+ testProperty "sf_drop" sf_drop,
926+ testProperty "t_drop" t_drop,
927+ testProperty "tl_drop" tl_drop,
928+ testProperty "s_take_drop" s_take_drop,
929+ testProperty "s_take_drop_s" s_take_drop_s,
930+ testProperty "s_takeWhile" s_takeWhile,
931+ testProperty "s_takeWhile_s" s_takeWhile_s,
932+ testProperty "sf_takeWhile" sf_takeWhile,
933+ testProperty "t_takeWhile" t_takeWhile,
934+ testProperty "tl_takeWhile" tl_takeWhile,
935+ testProperty "sf_dropWhile" sf_dropWhile,
936+ testProperty "s_dropWhile" s_dropWhile,
937+ testProperty "s_dropWhile_s" s_dropWhile_s,
938+ testProperty "t_dropWhile" t_dropWhile,
939+ testProperty "tl_dropWhile" tl_dropWhile,
940+ testProperty "t_dropWhileEnd" t_dropWhileEnd,
941+ testProperty "tl_dropWhileEnd" tl_dropWhileEnd,
942+ testProperty "t_dropAround" t_dropAround,
943+ testProperty "tl_dropAround" tl_dropAround,
944+ testProperty "t_stripStart" t_stripStart,
945+ testProperty "tl_stripStart" tl_stripStart,
946+ testProperty "t_stripEnd" t_stripEnd,
947+ testProperty "tl_stripEnd" tl_stripEnd,
948+ testProperty "t_strip" t_strip,
949+ testProperty "tl_strip" tl_strip,
950+ testProperty "t_splitAt" t_splitAt,
951+ testProperty "tl_splitAt" tl_splitAt,
952+ testProperty "t_span" t_span,
953+ testProperty "tl_span" tl_span,
954+ testProperty "t_breakOn_id" t_breakOn_id,
955+ testProperty "tl_breakOn_id" tl_breakOn_id,
956+ testProperty "t_breakOn_start" t_breakOn_start,
957+ testProperty "tl_breakOn_start" tl_breakOn_start,
958+ testProperty "t_breakOnEnd_end" t_breakOnEnd_end,
959+ testProperty "tl_breakOnEnd_end" tl_breakOnEnd_end,
960+ testProperty "t_break" t_break,
961+ testProperty "tl_break" tl_break,
962+ testProperty "t_group" t_group,
963+ testProperty "tl_group" tl_group,
964+ testProperty "t_groupBy" t_groupBy,
965+ testProperty "tl_groupBy" tl_groupBy,
966+ testProperty "t_inits" t_inits,
967+ testProperty "tl_inits" tl_inits,
968+ testProperty "t_tails" t_tails,
969+ testProperty "tl_tails" tl_tails
970+ ],
971+
972+ testGroup "breaking many" [
973+ testProperty "t_findAppendId" t_findAppendId,
974+ testProperty "tl_findAppendId" tl_findAppendId,
975+ testProperty "t_findContains" t_findContains,
976+ testProperty "tl_findContains" tl_findContains,
977+ testProperty "sl_filterCount" sl_filterCount,
978+ testProperty "t_findCount" t_findCount,
979+ testProperty "tl_findCount" tl_findCount,
980+ testProperty "t_splitOn_split" t_splitOn_split,
981+ testProperty "tl_splitOn_split" tl_splitOn_split,
982+ testProperty "t_splitOn_i" t_splitOn_i,
983+ testProperty "tl_splitOn_i" tl_splitOn_i,
984+ testProperty "t_split" t_split,
985+ testProperty "t_split_count" t_split_count,
986+ testProperty "t_split_splitOn" t_split_splitOn,
987+ testProperty "tl_split" tl_split,
988+ testProperty "t_chunksOf_same_lengths" t_chunksOf_same_lengths,
989+ testProperty "t_chunksOf_length" t_chunksOf_length,
990+ testProperty "tl_chunksOf" tl_chunksOf
991+ ],
992+
993+ testGroup "lines and words" [
994+ testProperty "t_lines" t_lines,
995+ testProperty "tl_lines" tl_lines,
996+ --testProperty "t_lines'" t_lines',
997+ testProperty "t_words" t_words,
998+ testProperty "tl_words" tl_words,
999+ testProperty "t_unlines" t_unlines,
1000+ testProperty "tl_unlines" tl_unlines,
1001+ testProperty "t_unwords" t_unwords,
1002+ testProperty "tl_unwords" tl_unwords
1003+ ]
1004+ ],
1005+
1006+ testGroup "predicates" [
1007+ testProperty "s_isPrefixOf" s_isPrefixOf,
1008+ testProperty "sf_isPrefixOf" sf_isPrefixOf,
1009+ testProperty "t_isPrefixOf" t_isPrefixOf,
1010+ testProperty "tl_isPrefixOf" tl_isPrefixOf,
1011+ testProperty "t_isSuffixOf" t_isSuffixOf,
1012+ testProperty "tl_isSuffixOf" tl_isSuffixOf,
1013+ testProperty "t_isInfixOf" t_isInfixOf,
1014+ testProperty "tl_isInfixOf" tl_isInfixOf,
1015+
1016+ testGroup "view" [
1017+ testProperty "t_stripPrefix" t_stripPrefix,
1018+ testProperty "tl_stripPrefix" tl_stripPrefix,
1019+ testProperty "t_stripSuffix" t_stripSuffix,
1020+ testProperty "tl_stripSuffix" tl_stripSuffix,
1021+ testProperty "t_commonPrefixes" t_commonPrefixes,
1022+ testProperty "tl_commonPrefixes" tl_commonPrefixes
1023+ ]
1024+ ],
1025+
1026+ testGroup "searching" [
1027+ testProperty "sf_elem" sf_elem,
1028+ testProperty "sf_filter" sf_filter,
1029+ testProperty "t_filter" t_filter,
1030+ testProperty "tl_filter" tl_filter,
1031+ testProperty "sf_findBy" sf_findBy,
1032+ testProperty "t_find" t_find,
1033+ testProperty "tl_find" tl_find,
1034+ testProperty "t_partition" t_partition,
1035+ testProperty "tl_partition" tl_partition
1036+ ],
1037+
1038+ testGroup "indexing" [
1039+ testProperty "sf_index" sf_index,
1040+ testProperty "t_index" t_index,
1041+ testProperty "tl_index" tl_index,
1042+ testProperty "t_findIndex" t_findIndex,
1043+ testProperty "t_count" t_count,
1044+ testProperty "tl_count" tl_count,
1045+ testProperty "t_indices" t_indices,
1046+ testProperty "tl_indices" tl_indices,
1047+ testProperty "t_indices_occurs" t_indices_occurs
1048+ ],
1049+
1050+ testGroup "zips" [
1051+ testProperty "t_zip" t_zip,
1052+ testProperty "tl_zip" tl_zip,
1053+ testProperty "sf_zipWith" sf_zipWith,
1054+ testProperty "t_zipWith" t_zipWith,
1055+ testProperty "tl_zipWith" tl_zipWith
1056+ ],
1057+
1058+ testGroup "regressions" [
1059+ testProperty "s_filter_eq" s_filter_eq
1060+ ],
1061+
1062+ testGroup "shifts" [
1063+ testProperty "shiftL_Int" shiftL_Int,
1064+ testProperty "shiftL_Word16" shiftL_Word16,
1065+ testProperty "shiftL_Word32" shiftL_Word32,
1066+ testProperty "shiftR_Int" shiftR_Int,
1067+ testProperty "shiftR_Word16" shiftR_Word16,
1068+ testProperty "shiftR_Word32" shiftR_Word32
1069+ ],
1070+
1071+ testGroup "builder" [
1072+ testProperty "t_builderSingleton" t_builderSingleton,
1073+ testProperty "t_builderFromText" t_builderFromText,
1074+ testProperty "t_builderAssociative" t_builderAssociative
1075+ ],
1076+
1077+ testGroup "read" [
1078+ testProperty "t_decimal" t_decimal,
1079+ testProperty "tl_decimal" tl_decimal,
1080+ testProperty "t_hexadecimal" t_hexadecimal,
1081+ testProperty "tl_hexadecimal" tl_hexadecimal,
1082+ testProperty "t_double" t_double,
1083+ testProperty "tl_double" tl_double,
1084+ testProperty "t_rational" t_rational,
1085+ testProperty "tl_rational" tl_rational
1086+ ],
1087+
1088+ testGroup "input-output" [
1089+ testProperty "t_write_read" t_write_read,
1090+ testProperty "tl_write_read" tl_write_read,
1091+ testProperty "t_write_read_line" t_write_read_line,
1092+ testProperty "tl_write_read_line" tl_write_read_line
1093+ -- These tests are subject to I/O race conditions when run under
1094+ -- test-framework-quickcheck2.
1095+ -- testProperty "t_put_get" t_put_get
1096+ -- testProperty "tl_put_get" tl_put_get
1097+ ],
1098+
1099+ testGroup "lowlevel" [
1100+ testProperty "t_dropWord16" t_dropWord16,
1101+ testProperty "t_takeWord16" t_takeWord16,
1102+ testProperty "t_take_drop_16" t_take_drop_16,
1103+ testProperty "t_use_from" t_use_from
10201104 ]
1021− ],
1022−
1023− testGroup "searching" [
1024− testProperty "sf_elem" sf_elem,
1025− testProperty "sf_filter" sf_filter,
1026− testProperty "t_filter" t_filter,
1027− testProperty "tl_filter" tl_filter,
1028− testProperty "sf_findBy" sf_findBy,
1029− testProperty "t_find" t_find,
1030− testProperty "tl_find" tl_find,
1031− testProperty "t_partition" t_partition,
1032− testProperty "tl_partition" tl_partition
1033− ],
1034−
1035− testGroup "indexing" [
1036− testProperty "sf_index" sf_index,
1037− testProperty "t_index" t_index,
1038− testProperty "tl_index" tl_index,
1039− testProperty "t_findIndex" t_findIndex,
1040− testProperty "t_count" t_count,
1041− testProperty "tl_count" tl_count,
1042− testProperty "t_indices" t_indices,
1043− testProperty "tl_indices" tl_indices,
1044− testProperty "t_indices_occurs" t_indices_occurs
1045− ],
1046−
1047− testGroup "zips" [
1048− testProperty "t_zip" t_zip,
1049− testProperty "tl_zip" tl_zip,
1050− testProperty "sf_zipWith" sf_zipWith,
1051− testProperty "t_zipWith" t_zipWith,
1052− testProperty "tl_zipWith" tl_zipWith
1053− ],
1054−
1055− testGroup "regressions" [
1056− testProperty "s_filter_eq" s_filter_eq
1057− ],
1058−
1059− testGroup "shifts" [
1060− testProperty "shiftL_Int" shiftL_Int,
1061− testProperty "shiftL_Word16" shiftL_Word16,
1062− testProperty "shiftL_Word32" shiftL_Word32,
1063− testProperty "shiftR_Int" shiftR_Int,
1064− testProperty "shiftR_Word16" shiftR_Word16,
1065− testProperty "shiftR_Word32" shiftR_Word32
1066− ],
1067−
1068− testGroup "builder" [
1069− testProperty "t_builderSingleton" t_builderSingleton,
1070− testProperty "t_builderFromText" t_builderFromText,
1071− testProperty "t_builderAssociative" t_builderAssociative
1072− ],
1073−
1074− testGroup "read" [
1075− testProperty "t_decimal" t_decimal,
1076− testProperty "tl_decimal" tl_decimal,
1077− testProperty "t_hexadecimal" t_hexadecimal,
1078− testProperty "tl_hexadecimal" tl_hexadecimal,
1079− testProperty "t_double" t_double,
1080− testProperty "tl_double" tl_double,
1081− testProperty "t_rational" t_rational,
1082− testProperty "tl_rational" tl_rational
1083− ],
1084−
1085− testGroup "input-output" [
1086− testProperty "t_write_read" t_write_read,
1087− testProperty "tl_write_read" tl_write_read,
1088− testProperty "t_write_read_line" t_write_read_line,
1089− testProperty "tl_write_read_line" tl_write_read_line
1090− -- These tests are subject to I/O race conditions when run under
1091− -- test-framework-quickcheck2.
1092− -- testProperty "t_put_get" t_put_get
1093− -- testProperty "tl_put_get" tl_put_get
1094− ],
1095−
1096− testGroup "lowlevel" [
1097− testProperty "t_dropWord16" t_dropWord16,
1098− testProperty "t_takeWord16" t_takeWord16,
1099− testProperty "t_take_drop_16" t_take_drop_16,
1100− testProperty "t_use_from" t_use_from
11011105 ]
1102− ]