Bryan O'Sullivan avatar Bryan O'Sullivan committed 1181844

Slow tests down - we were shrinking too aggressively

Comments (0)

Files changed (1)

tests/Properties.hs

 tl_Show           = show     `eq` (show . TL.pack)
 t_mappend s       = mappend s`eqP` (unpackS . mappend (T.pack s))
 tl_mappend s      = mappend s`eqP` (unpackS . mappend (TL.pack s))
-t_mconcat         = unsquare (mconcat `eq` (unpackS . mconcat . L.map T.pack))
-tl_mconcat        = unsquare (mconcat `eq` (unpackS . mconcat . L.map TL.pack))
+t_mconcat         = mconcat `eq` (unpackS . mconcat . L.map T.pack)
+tl_mconcat        = mconcat `eq` (unpackS . mconcat . L.map TL.pack)
 t_IsString        = fromString  `eqP` (T.unpack . fromString)
 tl_IsString       = fromString  `eqP` (TL.unpack . fromString)
 
 sf_map p f        = (map f . L.filter p)  `eqP` (unpackS . S.map f . S.filter p)
 t_map f           = map f  `eqP` (unpackS . T.map f)
 tl_map f          = map f  `eqP` (unpackS . TL.map f)
-t_intercalate c   = unsquare $ L.intercalate c `eq`
-                               (unpackS . T.intercalate (packS c) . map packS)
-tl_intercalate c  = unsquare $
-                    L.intercalate c `eq`
+t_intercalate c   = L.intercalate c `eq`
+                    (unpackS . T.intercalate (packS c) . map packS)
+tl_intercalate c  = L.intercalate c `eq`
                     (unpackS . TL.intercalate (TL.pack c) . map TL.pack)
 s_intersperse c   = L.intersperse c `eqP`
                     (unpackS . S.intersperse c)
                    (unpackS . S.intersperse c . S.filter p)
 t_intersperse c   = L.intersperse c `eqP` (unpackS . T.intersperse c)
 tl_intersperse c  = L.intersperse c `eqP` (unpackS . TL.intersperse c)
-t_transpose       = unsquare $ L.transpose `eq`
-                               (map unpackS . T.transpose . map packS)
-tl_transpose      = unsquare $ L.transpose `eq`
-                               (map unpackS . TL.transpose . map TL.pack)
+t_transpose       = L.transpose `eq` (map unpackS . T.transpose . map packS)
+tl_transpose      = L.transpose `eq` (map unpackS . TL.transpose . map TL.pack)
 t_reverse         = L.reverse `eqP` (unpackS . T.reverse)
 tl_reverse        = L.reverse `eqP` (unpackS . TL.reverse)
 t_reverse_short n = L.reverse `eqP` (unpackS . S.reverse . shorten n . S.stream)
 t_foldr1 f        = L.foldr1 f   `eqP` T.foldr1 f
 tl_foldr1 f       = L.foldr1 f   `eqP` TL.foldr1 f
 
-s_concat_s        = unsquare $ L.concat `eq`
-                               (unpackS . S.unstream . S.concat . map packS)
-sf_concat p       = unsquare $ (L.concat . map (L.filter p)) `eq`
-                               (unpackS . S.concat . map (S.filter p . packS))
-t_concat          = unsquare (L.concat `eq` (unpackS . T.concat . map packS))
-tl_concat         = unsquare (L.concat `eq` (unpackS . TL.concat . map TL.pack))
+s_concat_s        = L.concat `eq` (unpackS . S.unstream . S.concat . map packS)
+sf_concat p       = (L.concat . map (L.filter p)) `eq`
+                    (unpackS . S.concat . map (S.filter p . packS))
+t_concat          = L.concat `eq` (unpackS . T.concat . map packS)
+tl_concat         = L.concat `eq` (unpackS . TL.concat . map TL.pack)
 sf_concatMap p f  = unsquare $ (L.concatMap f . L.filter p) `eqP`
                                (unpackS . S.concatMap (packS . f) . S.filter p)
 t_concatMap f     = unsquare $
 t_scanr1 f        = L.scanr1 f    `eqP` (unpackS . T.scanr1 f)
 tl_scanr1 f       = L.scanr1 f    `eqP` (unpackS . TL.scanr1 f)
 
-t_mapAccumL f z   = unsquare $
-                    L.mapAccumL f z `eqP` (second unpackS . T.mapAccumL f z)
-    where _types = f :: Int -> Char -> (Int,Char)
-tl_mapAccumL f z  = unsquare $
-                    L.mapAccumL f z `eqP` (second unpackS . TL.mapAccumL f z)
-    where _types = f :: Int -> Char -> (Int,Char)
-t_mapAccumR f z   = unsquare $
-                    L.mapAccumR f z `eqP` (second unpackS . T.mapAccumR f z)
-    where _types = f :: Int -> Char -> (Int,Char)
-tl_mapAccumR f z   = unsquare $
-                     L.mapAccumR f z `eqP` (second unpackS . TL.mapAccumR f z)
-    where _types = f :: Int -> Char -> (Int,Char)
+t_mapAccumL f z   = L.mapAccumL f z `eqP` (second unpackS . T.mapAccumL f z)
+    where _types  = f :: Int -> Char -> (Int,Char)
+tl_mapAccumL f z  = L.mapAccumL f z `eqP` (second unpackS . TL.mapAccumL f z)
+    where _types  = f :: Int -> Char -> (Int,Char)
+t_mapAccumR f z   = L.mapAccumR f z `eqP` (second unpackS . T.mapAccumR f z)
+    where _types  = f :: Int -> Char -> (Int,Char)
+tl_mapAccumR f z  = L.mapAccumR f z `eqP` (second unpackS . TL.mapAccumR f z)
+    where _types  = f :: Int -> Char -> (Int,Char)
 
 replicate n l = concat (L.replicate n l)
 
 tl_findAppendId (NotEmpty s) = unsquare $ \ts ->
     let t = TL.intercalate s ts
     in all (==t) $ map (uncurry TL.append) (TL.find s t)
-t_findContains (NotEmpty s) = unsquare $ all (T.isPrefixOf s . snd) . T.find s .
-                                         T.intercalate s
-tl_findContains (NotEmpty s) = unsquare $ all (TL.isPrefixOf s . snd) .
-                                          TL.find s . TL.intercalate s
+t_findContains (NotEmpty s) = all (T.isPrefixOf s . snd) . T.find s .
+                              T.intercalate s
+tl_findContains (NotEmpty s) = all (TL.isPrefixOf s . snd) .
+                               TL.find s . TL.intercalate s
 sl_filterCount c  = (L.genericLength . L.filter (==c)) `eqP` SL.countChar c
 t_findCount s     = (L.length . T.find s) `eq` T.count s
 tl_findCount s    = (L.genericLength . TL.find s) `eq` TL.count s
 
-t_split_split s         = unsquare $
-                          (T.split s `eq` Slow.split s) . T.intercalate s
-tl_split_split s        = unsquare $
-                          ((TL.split (TL.fromStrict s) . TL.fromStrict) `eq`
+t_split_split s         = (T.split s `eq` Slow.split s) . T.intercalate s
+tl_split_split s        = ((TL.split (TL.fromStrict s) . TL.fromStrict) `eq`
                            (map TL.fromStrict . T.split s)) . T.intercalate s
 t_split_i (NotEmpty t)  = id `eq` (T.intercalate t . T.split t)
 tl_split_i (NotEmpty t) = id `eq` (TL.intercalate t . TL.split t)
 t_words           = L.words       `eqP` (map unpackS . T.words)
 
 tl_words          = L.words       `eqP` (map unpackS . TL.words)
-t_unlines         = unsquare (L.unlines `eq` (unpackS . T.unlines . map packS))
-tl_unlines        = unsquare (L.unlines `eq` (unpackS . TL.unlines . map packS))
-t_unwords         = unsquare (L.unwords `eq` (unpackS . T.unwords . map packS))
-tl_unwords        = unsquare (L.unwords `eq` (unpackS . TL.unwords . map packS))
+t_unlines         = L.unlines `eq` (unpackS . T.unlines . map packS)
+tl_unlines        = L.unlines `eq` (unpackS . TL.unlines . map packS)
+t_unwords         = L.unwords `eq` (unpackS . T.unwords . map packS)
+tl_unwords        = L.unwords `eq` (unpackS . TL.unwords . map packS)
 
 s_isPrefixOf s    = L.isPrefixOf s `eqP`
                     (S.isPrefixOf (S.stream $ packS s) . S.stream)
 t_zipWith c s     = L.zipWith c s `eqP` (unpackS . T.zipWith c (packS s))
 tl_zipWith c s    = L.zipWith c s `eqP` (unpackS . TL.zipWith c (packS s))
 
-t_indices  = unsquare (\(NotEmpty s) -> Slow.indices s `eq` indices s)
-tl_indices = unsquare (\(NotEmpty s) -> lazyIndices s `eq` S.indices s)
-    where lazyIndices s t = map fromIntegral $ Slow.indices (conc s) (conc t)
+t_indices  (NotEmpty s) = Slow.indices s `eq` indices s
+tl_indices (NotEmpty s) = lazyIndices s `eq` S.indices s
+    where lazyIndices ss t = map fromIntegral $ Slow.indices (conc ss) (conc t)
           conc = T.concat . TL.toChunks
-t_indices_occurs (NotEmpty t) = unsquare $ \ts ->
-                                let s = T.intercalate t ts
-                                in Slow.indices t s == indices t s
+t_indices_occurs (NotEmpty t) ts = let s = T.intercalate t ts
+                                   in Slow.indices t s == indices t s
 
 -- Bit shifts.
 shiftL w = forAll (choose (0,width-1)) $ \k -> Bits.shiftL w k == U.shiftL w k
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.