Bryan O'Sullivan avatar Bryan O'Sullivan committed c4669e2

More whitespace tidiness, and kill duplicative chunkify

Comments (0)

Files changed (1)

tests/Properties.hs

 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)
-sl_filterCount c    = (L.genericLength . L.filter (==c)) `eqP` SL.countChar c
+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
+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 (chunkify s) . chunkify) `eq`
-                                     (map chunkify . T.split s)) .
-                                    T.intercalate 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`
+                           (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_chunksOf_length k t = len == T.length t || (k <= 0 && len == 0)
   where len = L.sum . L.map T.length $ T.chunksOf k t
 
-chunkify = TL.fromChunks . (:[])
-
 tl_chunksOf k = T.chunksOf k `eq` (map (T.concat . TL.toChunks) .
-                                   TL.chunksOf (fromIntegral k) . chunkify)
+                                   TL.chunksOf (fromIntegral k) . TL.fromStrict)
 
 t_lines           = L.lines       `eqP` (map unpackS . T.lines)
 tl_lines          = L.lines       `eqP` (map unpackS . TL.lines)
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.