text / tests / Properties.hs

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-enable-rewrite-rules #-}

import Test.QuickCheck
import Text.Show.Functions

import Data.Char
import Debug.Trace
import Text.Printf
import System.Environment
import Control.Applicative
import Control.Arrow
import Control.Monad
import Data.Word
import qualified Data.ByteString as B
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Encoding as E
import Control.Exception
import qualified Data.Text.Fusion as S
import qualified Data.Text.Fusion.Common as S
import qualified Data.Text.Lazy.Encoding as EL
import qualified Data.Text.Lazy.Fusion as SL
import qualified Data.List as L
import System.IO.Unsafe
import Prelude hiding (catch)

import QuickCheckUtils

-- If a pure property threatens to crash, wrap it with this to keep
-- QuickCheck from bombing out.
crashy :: a -> a -> a
{-# NOINLINE crashy #-}
crashy onException p = unsafePerformIO $
    (return $! p) `catch` \e ->
    let types = e :: SomeException
    in trace ("*** Exception: " ++ show e) return onException

prop_T_pack_unpack       = (T.unpack . T.pack) `eq` id
prop_TL_pack_unpack      = (TL.unpack . TL.pack) `eq` id
prop_T_stream_unstream   = (S.unstream . S.stream) `eq` id
prop_TL_stream_unstream  = (SL.unstream . SL.stream) `eq` id
prop_T_reverse_stream t  = (S.reverse . S.reverseStream) t == t
prop_T_singleton c       = [c] == (T.unpack . T.singleton) c
prop_TL_singleton c      = [c] == (TL.unpack . TL.singleton) c
prop_TL_unstreamChunks x = f 11 x == f 1000 x
    where f n = SL.unstreamChunks n . S.streamList
prop_TL_chunk_unchunk    = (TL.fromChunks . TL.toChunks) `eq` id

prop_T_ascii t           = E.decodeASCII (E.encodeUtf8 a) == a
    where a              = T.map (\c -> chr (ord c `mod` 128)) t
prop_T_utf8              = (E.decodeUtf8 . E.encodeUtf8) `eq` id
prop_TL_utf8             = (EL.decodeUtf8 . EL.encodeUtf8) `eq` id
prop_T_utf16LE           = (E.decodeUtf16LE . E.encodeUtf16LE) `eq` id
prop_T_utf16BE           = (E.decodeUtf16BE . E.encodeUtf16BE) `eq` id
prop_T_utf32LE           = (E.decodeUtf32LE . E.encodeUtf32LE) `eq` id
prop_T_utf32BE           = (E.decodeUtf32BE . E.encodeUtf32BE) `eq` id

class Stringy s where
    packS    :: String -> s
    unpackS  :: s -> String
    splitAtS :: Int -> s -> (s,s)
    packSChunkSize :: Int -> String -> s
    packSChunkSize _ = packS

instance Stringy String where
    packS    = id
    unpackS  = id
    splitAtS = splitAt

instance Stringy (S.Stream Char) where
    packS        = S.streamList
    unpackS      = S.unstreamList
    splitAtS n s = (S.take n s, S.drop n s)

instance Stringy T.Text where
    packS    = T.pack
    unpackS  = T.unpack
    splitAtS = T.splitAt

instance Stringy TL.Text where
    packSChunkSize k = SL.unstreamChunks k . S.streamList
    packS    = TL.pack
    unpackS  = TL.unpack
    splitAtS = TL.splitAt . fromIntegral

-- Do two functions give the same answer?
eq :: (Eq a) => (t -> a) -> (t -> a) -> t -> Bool
eq a b s  = crashy False $ a s == b s

-- What about with the RHS packed?
eqP :: (Eq a, Show a, Stringy s) =>
       (String -> a) -> (s -> a) -> String -> Word8 -> Bool
eqP a b s w  = eq "orig" (a s) (b t) &&
               eq "mini" (a s) (b mini) &&
               eq "head" (a sa) (b ta) &&
               eq "tail" (a sb) (b tb)
    where t             = packS s
          mini          = packSChunkSize 10 s
          (sa,sb)       = splitAt m s
          (ta,tb)       = splitAtS m t
          l             = length s
          m | l == 0    = n
            | otherwise = n `mod` l
          n             = fromIntegral w
          eq s a b | crashy False $ a == b = True
                   | otherwise = trace (s ++ ": " ++ show a ++ " /= " ++ show b) False

-- Or with the string non-empty, and the RHS packed?
eqEP :: (Eq a, Stringy s) =>
        (String -> a) -> (s -> a) -> NotEmpty String -> Word8 -> Bool
eqEP a b e w  = a s == b t &&
                a s == b mini &&
                (null sa || a sa == b ta) &&
                (null sb || a sb == b tb)
    where (sa,sb)       = splitAt m s
          (ta,tb)       = splitAtS m t
          t             = packS s
          mini          = packSChunkSize 10 s
          l             = length s
          m | l == 0    = n
            | otherwise = n `mod` l
          n             = fromIntegral w
          s             = notEmpty e

prop_S_cons x          = (x:)     `eqP` (unpackS . S.cons x)
prop_T_cons x          = (x:)     `eqP` (unpackS . T.cons x)
prop_TL_cons x         = ((x:)     `eqP` (TL.unpack . TL.cons x))
prop_S_snoc x          = (++ [x]) `eqP` (unpackS . (flip S.snoc) x)
prop_T_snoc x          = (++ [x]) `eqP` (unpackS . (flip T.snoc) x)
prop_TL_snoc x         = (++ [x]) `eqP` (unpackS . (flip TL.snoc) x)
prop_T_append s        = (s++)    `eqP` (unpackS . T.append (packS s))
prop_T_appendS s       = (s++)    `eqP` (unpackS . S.unstream . S.append (S.stream (packS s)) . S.stream)

uncons (x:xs) = Just (x,xs)
uncons _      = Nothing

prop_T_uncons s        = uncons   `eqP` (fmap (second unpackS) . T.uncons)
    where types = s :: String
prop_TL_uncons s       = uncons   `eqP` (fmap (second unpackS) . TL.uncons)
    where types = s :: String
prop_S_head            = head   `eqEP` S.head
prop_T_head            = head   `eqEP` T.head
prop_TL_head           = head   `eqEP` TL.head
prop_S_last            = last   `eqEP` S.last
prop_T_last            = last   `eqEP` T.last
prop_TL_last           = last   `eqEP` TL.last
prop_S_tail            = tail   `eqEP` (unpackS . S.tail)
prop_T_tail            = tail   `eqEP` (unpackS . T.tail)
prop_TL_tail           = tail   `eqEP` (unpackS . TL.tail)
prop_S_init            = init   `eqEP` (unpackS . S.init)
prop_T_init            = init   `eqEP` (unpackS . T.init)
prop_TL_init           = init   `eqEP` (unpackS . TL.init)
prop_S_null            = null   `eqP`  S.null
prop_T_null            = null   `eqP`  T.null
prop_TL_null           = null   `eqP`  TL.null
prop_S_length          = length `eqP`  S.length
prop_T_length          = length `eqP`  T.length
prop_TL_length         = length `eqP`  (fromIntegral . TL.length)
prop_T_map f           = map f  `eqP`  (unpackS . T.map f)
prop_TL_map f          = map f  `eqP`  (unpackS . TL.map f)
prop_T_intercalate c   = L.intercalate c `eq` (unpackS . T.intercalate (packS c) . map packS)
prop_TL_intercalate c  = L.intercalate c `eq` (unpackS . TL.intercalate (TL.pack c) . map TL.pack)
prop_T_intersperse c   = L.intersperse c `eqP` (unpackS . T.intersperse c)
prop_TL_intersperse c  = L.intersperse c `eqP` (unpackS . TL.intersperse c)
prop_T_transpose       = L.transpose `eq` (map unpackS . T.transpose . map packS)
prop_TL_transpose      = L.transpose `eq` (map unpackS . TL.transpose . map TL.pack)
prop_T_reverse         = L.reverse `eqP` (unpackS . T.reverse)
prop_TL_reverse        = L.reverse `eqP` (unpackS . TL.reverse)
prop_T_reverse_short n = L.reverse `eqP` (unpackS . S.reverse . shorten n . S.stream)

prop_T_foldl f z       = L.foldl f z  `eqP`  (T.foldl f z)
    where types      = f :: Char -> Char -> Char
prop_TL_foldl f z      = L.foldl f z  `eqP`  (TL.foldl f z)
    where types      = f :: Char -> Char -> Char
prop_T_foldl' f z      = L.foldl' f z `eqP`  T.foldl' f z
    where types      = f :: Char -> Char -> Char
prop_TL_foldl' f z     = L.foldl' f z `eqP`  TL.foldl' f z
    where types      = f :: Char -> Char -> Char
prop_T_foldl1 f        = L.foldl1 f   `eqEP` T.foldl1 f
prop_TL_foldl1 f       = L.foldl1 f   `eqEP` TL.foldl1 f
prop_T_foldl1' f       = L.foldl1' f  `eqEP` T.foldl1' f
prop_TL_foldl1' f      = L.foldl1' f  `eqEP` TL.foldl1' f
prop_T_foldr f z       = L.foldr f z  `eqP`  T.foldr f z
    where types      = f :: Char -> Char -> Char
prop_TL_foldr f z      = L.foldr f z  `eqP`  TL.foldr f z
    where types      = f :: Char -> Char -> Char
prop_T_foldr1 f        = L.foldr1 f   `eqEP` T.foldr1 f
prop_TL_foldr1 f       = L.foldr1 f   `eqEP` TL.foldr1 f

prop_T_concat          = L.concat      `eq`   (unpackS . T.concat . map packS)
prop_TL_concat         = L.concat      `eq`   (unpackS . TL.concat . map TL.pack)
prop_T_concatMap f     = L.concatMap f `eqP`  (unpackS . T.concatMap (packS . f))
prop_TL_concatMap f    = L.concatMap f `eqP`  (unpackS . TL.concatMap (TL.pack . f))
prop_T_any p           = L.any p       `eqP`  T.any p
prop_TL_any p          = L.any p       `eqP`  TL.any p
prop_T_all p           = L.all p       `eqP`  T.all p
prop_TL_all p          = L.all p       `eqP`  TL.all p
prop_T_maximum         = L.maximum     `eqEP` T.maximum
prop_TL_maximum        = L.maximum     `eqEP` TL.maximum
prop_T_minimum         = L.minimum     `eqEP` T.minimum
prop_TL_minimum        = L.minimum     `eqEP` TL.minimum

prop_T_scanl f z       = L.scanl f z   `eqP`  (unpackS . T.scanl f z)
prop_TL_scanl f z      = L.scanl f z   `eqP`  (unpackS . TL.scanl f z)
prop_T_scanl1 f        = L.scanl1 f    `eqP`  (unpackS . T.scanl1 f)
prop_TL_scanl1 f       = L.scanl1 f    `eqP`  (unpackS . TL.scanl1 f)
prop_T_scanr f z       = L.scanr f z   `eqP`  (unpackS . T.scanr f z)
prop_TL_scanr f z      = L.scanr f z   `eqP`  (unpackS . TL.scanr f z)
prop_T_scanr1 f        = L.scanr1 f    `eqP`  (unpackS . T.scanr1 f)
prop_TL_scanr1 f       = L.scanr1 f    `eqP`  (unpackS . TL.scanr1 f)

prop_T_mapAccumL f z   = L.mapAccumL f z `eqP` (second unpackS . T.mapAccumL f z)
    where types = f :: Int -> Char -> (Int,Char)
prop_TL_mapAccumL f z  = L.mapAccumL f z `eqP` (second unpackS . TL.mapAccumL f z)
    where types = f :: Int -> Char -> (Int,Char)
prop_T_mapAccumR f z   = L.mapAccumR f z `eqP` (second unpackS . T.mapAccumR f z)
    where types = f :: Int -> Char -> (Int,Char)
prop_TL_mapAccumR f z   = L.mapAccumR f z `eqP` (second unpackS . TL.mapAccumR f z)
    where types = f :: Int -> Char -> (Int,Char)

prop_T_replicate n     = L.replicate n `eq` (unpackS . T.replicate n)
prop_TL_replicate n    = L.replicate n `eq` (unpackS . TL.replicate n)

unf :: Int -> Char -> Maybe (Char, Char)
unf n c | fromEnum c * 100 > n = Nothing
        | otherwise            = Just (c, succ c)

prop_T_unfoldr n       = L.unfoldr (unf n) `eq` (unpackS . T.unfoldr (unf n))
prop_TL_unfoldr n      = L.unfoldr (unf n) `eq` (unpackS . TL.unfoldr (unf n))
prop_T_unfoldrN n m    = (L.take n . L.unfoldr (unf m)) `eq`
                         (unpackS . T.unfoldrN n (unf m))
prop_TL_unfoldrN n m   = (L.take n . L.unfoldr (unf m)) `eq`
                         (unpackS . TL.unfoldrN (fromIntegral n) (unf m))

unpack2 :: (Stringy s) => (s,s) -> (String,String)
unpack2 = unpackS *** unpackS

prop_S_take n          = L.take n      `eqP` (unpackS . S.take n)
prop_T_take n          = L.take n      `eqP` (unpackS . T.take n)
prop_TL_take n         = L.take n      `eqP` (unpackS . TL.take (fromIntegral n))
prop_S_drop n          = L.drop n      `eqP` (unpackS . S.drop n)
prop_T_drop n          = L.drop n      `eqP` (unpackS . T.drop n)
prop_TL_drop n         = L.drop n      `eqP` (unpackS . TL.drop n)
prop_S_takeWhile p     = L.takeWhile p `eqP` (unpackS . S.takeWhile p)
prop_T_takeWhile p     = L.takeWhile p `eqP` (unpackS . T.takeWhile p)
prop_TL_takeWhile p    = L.takeWhile p `eqP` (unpackS . TL.takeWhile p)
prop_S_dropWhile p     = L.dropWhile p `eqP` (unpackS . S.dropWhile p)
prop_T_dropWhile p     = L.dropWhile p `eqP` (unpackS . T.dropWhile p)
prop_TL_dropWhile p    = L.dropWhile p `eqP` (unpackS . S.dropWhile p)
prop_T_splitAt n       = L.splitAt n   `eqP` (unpack2 . T.splitAt n)
prop_TL_splitAt n      = L.splitAt n   `eqP` (unpack2 . TL.splitAt (fromIntegral n))
prop_T_span p          = L.span p      `eqP` (unpack2 . T.span p)
prop_TL_span p         = L.span p      `eqP` (unpack2 . TL.span p)
prop_T_break p         = L.break p     `eqP` (unpack2 . T.break p)
prop_TL_break p        = L.break p     `eqP` (unpack2 . TL.break p)
prop_T_group           = L.group       `eqP` (map unpackS . T.group)
prop_TL_group          = L.group       `eqP` (map unpackS . TL.group)
prop_T_groupBy p       = L.groupBy p   `eqP` (map unpackS . T.groupBy p)
prop_TL_groupBy p      = L.groupBy p   `eqP` (map unpackS . TL.groupBy p)
prop_T_inits           = L.inits       `eqP` (map unpackS . T.inits)
prop_TL_inits          = L.inits       `eqP` (map unpackS . TL.inits)
prop_T_tails           = L.tails       `eqP` (map unpackS . T.tails)
prop_TL_tails          = L.tails       `eqP` (map unpackS . TL.tails)

prop_T_split_i c       = id `eq` (T.intercalate (T.singleton c) . T.split c)
prop_TL_split_i c      = id `eq` (TL.intercalate (TL.singleton c) . TL.split c)

prop_T_splitWith p     = splitWith p `eqP` (map unpackS . T.splitWith p)
prop_TL_splitWith p    = splitWith p `eqP` (map unpackS . TL.splitWith p)

splitWith :: (a -> Bool) -> [a] -> [[a]]
splitWith _ [] =  []
splitWith p xs = loop xs
    where loop s | null s'   = [l]
                 | otherwise = l : loop (tail s')
              where (l, s') = break p s

prop_T_breakSubstring_isInfixOf s l
                     = T.isInfixOf s l ==
                       T.null s || (not . T.null . snd $ T.breakSubstring s l)
prop_T_breakSubstringC c
                     = L.break (==c) `eqP`
                       (unpack2 . T.breakSubstring (T.singleton c))

prop_T_lines           = L.lines       `eqP` (map unpackS . T.lines)
prop_TL_lines          = L.lines       `eqP` (map unpackS . TL.lines)
{-
prop_T_lines'          = lines'        `eqP` (map unpackS . T.lines')
    where lines' "" =  []
          lines' s =  let (l, s') = break eol s
                      in  l : case s' of
                                []      -> []
                                ('\r':'\n':s'') -> lines' s''
                                (_:s'') -> lines' s''
          eol c = c == '\r' || c == '\n'
-}
prop_T_words           = L.words       `eqP` (map unpackS . T.words)
prop_TL_words          = L.words       `eqP` (map unpackS . TL.words)
prop_T_unlines         = L.unlines     `eq`  (unpackS . T.unlines . map packS)
prop_TL_unlines        = L.unlines     `eq`  (unpackS . TL.unlines . map packS)
prop_T_unwords         = L.unwords     `eq`  (unpackS . T.unwords . map packS)
prop_TL_unwords        = L.unwords     `eq`  (unpackS . TL.unwords . map packS)

prop_S_isPrefixOf s    = L.isPrefixOf s`eqP` (S.isPrefixOf (S.stream $ packS s) . S.stream)
prop_T_isPrefixOf s    = L.isPrefixOf s`eqP` T.isPrefixOf (packS s)
prop_TL_isPrefixOf s   = L.isPrefixOf s`eqP` TL.isPrefixOf (packS s)
prop_T_isSuffixOf s    = L.isSuffixOf s`eqP` T.isSuffixOf (packS s)
prop_TL_isSuffixOf s   = L.isSuffixOf s`eqP` TL.isSuffixOf (packS s)
prop_T_isInfixOf s     = L.isInfixOf s `eqP` T.isInfixOf (packS s)
prop_TL_isInfixOf s    = L.isInfixOf s `eqP` TL.isInfixOf (packS s)

prop_T_elem c          = L.elem c      `eqP` T.elem c
prop_TL_elem c         = L.elem c      `eqP` TL.elem c
prop_T_filter p        = L.filter p    `eqP` (unpackS . T.filter p)
prop_TL_filter p       = L.filter p    `eqP` (unpackS . TL.filter p)
prop_T_find p          = L.find p      `eqP` T.find p
prop_TL_find p         = L.find p      `eqP` TL.find p
prop_T_partition p     = L.partition p `eqP` (unpack2 . T.partition p)
prop_TL_partition p    = L.partition p `eqP` (unpack2 . TL.partition p)

prop_T_index x s       = x < L.length s && x >= 0 ==>
                         (L.!!) s x == T.index (packS s) x
prop_TL_index x s      = x < L.length s && x >= 0 ==>
                         (L.!!) s x == TL.index (packS s) (fromIntegral x)
prop_T_findIndex p     = L.findIndex p `eqP` T.findIndex p
prop_TL_findIndex p    = (fmap fromIntegral . L.findIndex p) `eqP` TL.findIndex p
prop_T_findIndices p   = L.findIndices p `eqP` T.findIndices p
prop_TL_findIndices p  = (fmap fromIntegral . L.findIndices p) `eqP` TL.findIndices p
prop_T_elemIndex c     = L.elemIndex c `eqP` T.elemIndex c
prop_TL_elemIndex c    = (fmap fromIntegral . L.elemIndex c) `eqP` TL.elemIndex c
prop_T_elemIndices c   = L.elemIndices c`eqP` T.elemIndices c
prop_TL_elemIndices c  = (fmap fromIntegral . L.elemIndices c) `eqP` TL.elemIndices c
prop_T_count c         = (L.length . L.elemIndices c) `eqP` T.count c
prop_TL_count c        = (fromIntegral . L.length . L.elemIndices c) `eqP` TL.count c
prop_T_zip s           = L.zip s `eqP` T.zip (packS s)
prop_TL_zip s          = L.zip s `eqP` TL.zip (packS s)
prop_T_zipWith c s     = L.zipWith c s `eqP` (unpackS . T.zipWith c (packS s))
prop_TL_zipWith c s    = L.zipWith c s `eqP` (unpackS . TL.zipWith c (packS s))

-- Regression tests.
prop_S_filter_eq s = S.filter p t == S.streamList (filter p s)
    where p = (/= S.last t)
          t = S.streamList s

-- Make a stream appear shorter than it really is, to ensure that
-- functions that consume inaccurately sized streams behave
-- themselves.
shorten :: Int -> S.Stream a -> S.Stream a
shorten n t@(S.Stream arr off len)
    | n < len && n > 0 = S.Stream arr off n
    | otherwise        = t

main = run tests =<< getArgs

run :: [(String, Int -> IO (Bool,Int))] -> [String] -> IO ()
run tests args = do
  let (n,names) = case args of
                    (k:ts) -> (read k,ts)
                    []  -> (100,[])
  (results,passed) <- fmap unzip . forM tests $ \(s,a) ->
                      if null names || s `elem` names
                      then printf "%-40s: " s >> a n
                      else return (True,0)
  printf "Passed %d tests!\n" (sum passed)
  when (not . and $ results) $
      fail "Not all tests passed!"

tests :: [(String, Int -> IO (Bool, Int))]
tests = [
  ("prop_T_pack_unpack", mytest prop_T_pack_unpack),
  ("prop_TL_pack_unpack", mytest prop_TL_pack_unpack),
  ("prop_T_stream_unstream", mytest prop_T_stream_unstream),
  ("prop_TL_stream_unstream", mytest prop_TL_stream_unstream),
  ("prop_T_reverse_stream", mytest prop_T_reverse_stream),
  ("prop_T_singleton", mytest prop_T_singleton),
  ("prop_TL_singleton", mytest prop_TL_singleton),
  ("prop_TL_unstreamChunks", mytest prop_TL_unstreamChunks),
  ("prop_TL_chunk_unchunk", mytest prop_TL_chunk_unchunk),

  ("prop_T_ascii", mytest prop_T_ascii),
  ("prop_T_utf8", mytest prop_T_utf8),
  ("prop_TL_utf8", mytest prop_TL_utf8),
  ("prop_T_utf16LE", mytest prop_T_utf16LE),
  ("prop_T_utf16BE", mytest prop_T_utf16BE),
  ("prop_T_utf32LE", mytest prop_T_utf32LE),
  ("prop_T_utf32BE", mytest prop_T_utf32BE),

  ("prop_S_cons", mytest prop_S_cons),
  ("prop_T_cons", mytest prop_T_cons),
  ("prop_TL_cons", mytest prop_TL_cons),
  ("prop_S_snoc", mytest prop_S_snoc),
  ("prop_T_snoc", mytest prop_T_snoc),
  ("prop_TL_snoc", mytest prop_TL_snoc),
  ("prop_T_append", mytest prop_T_append),
  ("prop_T_appendS", mytest prop_T_appendS),
  ("prop_T_uncons", mytest prop_T_uncons),
  ("prop_TL_uncons", mytest prop_TL_uncons),
  ("prop_S_head", mytest prop_S_head),
  ("prop_T_head", mytest prop_T_head),
  ("prop_TL_head", mytest prop_TL_head),
  ("prop_S_last", mytest prop_S_last),
  ("prop_T_last", mytest prop_T_last),
  ("prop_TL_last", mytest prop_TL_last),
  ("prop_S_tail", mytest prop_S_tail),
  ("prop_T_tail", mytest prop_T_tail),
  ("prop_TL_tail", mytest prop_TL_tail),
  ("prop_S_init", mytest prop_S_init),
  ("prop_T_init", mytest prop_T_init),
  ("prop_TL_init", mytest prop_TL_init),
  ("prop_S_null", mytest prop_S_null),
  ("prop_T_null", mytest prop_T_null),
  ("prop_TL_null", mytest prop_TL_null),
  ("prop_S_length", mytest prop_S_length),
  ("prop_T_length", mytest prop_T_length),
  ("prop_TL_length", mytest prop_TL_length),

  ("prop_T_map", mytest prop_T_map),
  ("prop_TL_map", mytest prop_TL_map),
  ("prop_T_intercalate", mytest prop_T_intercalate),
  ("prop_TL_intercalate", mytest prop_TL_intercalate),
  ("prop_T_intersperse", mytest prop_T_intersperse),
  ("prop_TL_intersperse", mytest prop_TL_intersperse),
  ("prop_T_transpose", mytest prop_T_transpose),
  ("prop_TL_transpose", mytest prop_TL_transpose),
  ("prop_T_reverse", mytest prop_T_reverse),
  ("prop_TL_reverse", mytest prop_TL_reverse),
  ("prop_T_reverse_short", mytest prop_T_reverse_short),

  ("prop_T_foldl", mytest prop_T_foldl),
  ("prop_TL_foldl", mytest prop_TL_foldl),
  ("prop_T_foldl'", mytest prop_T_foldl'),
  ("prop_TL_foldl'", mytest prop_TL_foldl'),
  ("prop_T_foldl1", mytest prop_T_foldl1),
  ("prop_TL_foldl1", mytest prop_TL_foldl1),
  ("prop_T_foldl1'", mytest prop_T_foldl1'),
  ("prop_TL_foldl1'", mytest prop_TL_foldl1'),
  ("prop_T_foldr", mytest prop_T_foldr),
  ("prop_TL_foldr", mytest prop_TL_foldr),
  ("prop_T_foldr1", mytest prop_T_foldr1),
  ("prop_TL_foldr1", mytest prop_TL_foldr1),

  ("prop_T_concat", mytest prop_T_concat),
  ("prop_TL_concat", mytest prop_TL_concat),
  ("prop_T_concatMap", mytest prop_T_concatMap),
  ("prop_TL_concatMap", mytest prop_TL_concatMap),
  ("prop_T_any", mytest prop_T_any),
  ("prop_TL_any", mytest prop_TL_any),
  ("prop_T_all", mytest prop_T_all),
  ("prop_TL_all", mytest prop_TL_all),
  ("prop_T_maximum", mytest prop_T_maximum),
  ("prop_TL_maximum", mytest prop_TL_maximum),
  ("prop_T_minimum", mytest prop_T_minimum),
  ("prop_TL_minimum", mytest prop_TL_minimum),

  ("prop_T_scanl", mytest prop_T_scanl),
  ("prop_TL_scanl", mytest prop_TL_scanl),
  ("prop_T_scanl1", mytest prop_T_scanl1),
  ("prop_TL_scanl1", mytest prop_TL_scanl1),
  ("prop_T_scanr", mytest prop_T_scanr),
  ("prop_TL_scanr", mytest prop_TL_scanr),
  ("prop_T_scanr1", mytest prop_T_scanr1),
  ("prop_TL_scanr1", mytest prop_TL_scanr1),

  ("prop_T_mapAccumL", mytest prop_T_mapAccumL),
  ("prop_TL_mapAccumL", mytest prop_TL_mapAccumL),
  ("prop_T_mapAccumR", mytest prop_T_mapAccumR),
  ("prop_TL_mapAccumR", mytest prop_TL_mapAccumR),

  ("prop_T_replicate", mytest prop_T_replicate),
  ("prop_TL_replicate", mytest prop_TL_replicate),
  ("prop_T_unfoldr", mytest prop_T_unfoldr),
  ("prop_TL_unfoldr", mytest prop_TL_unfoldr),
  ("prop_T_unfoldrN", mytest prop_T_unfoldrN),
  ("prop_TL_unfoldrN", mytest prop_TL_unfoldrN),

  ("prop_S_take", mytest prop_S_take),
  ("prop_T_take", mytest prop_T_take),
  ("prop_TL_take", mytest prop_TL_take),
  ("prop_S_drop", mytest prop_S_drop),
  ("prop_T_drop", mytest prop_T_drop),
  ("prop_TL_drop", mytest prop_TL_drop),
  ("prop_S_takeWhile", mytest prop_S_takeWhile),
  ("prop_T_takeWhile", mytest prop_T_takeWhile),
  ("prop_TL_takeWhile", mytest prop_TL_takeWhile),
  ("prop_S_dropWhile", mytest prop_S_dropWhile),
  ("prop_T_dropWhile", mytest prop_T_dropWhile),
  ("prop_TL_dropWhile", mytest prop_TL_dropWhile),
  ("prop_T_splitAt", mytest prop_T_splitAt),
  ("prop_T_span", mytest prop_T_span),
  ("prop_TL_span", mytest prop_TL_span),
  ("prop_T_break", mytest prop_T_break),
  ("prop_TL_break", mytest prop_TL_break),
  ("prop_T_group", mytest prop_T_group),
  ("prop_TL_group", mytest prop_TL_group),
  ("prop_T_groupBy", mytest prop_T_groupBy),
  ("prop_TL_groupBy", mytest prop_TL_groupBy),
  ("prop_T_inits", mytest prop_T_inits),
  ("prop_TL_inits", mytest prop_TL_inits),
  ("prop_T_tails", mytest prop_T_tails),
  ("prop_TL_tails", mytest prop_TL_tails),

  ("prop_T_split_i", mytest prop_T_split_i),
  ("prop_TL_split_i", mytest prop_TL_split_i),
  ("prop_T_splitWith", mytest prop_T_splitWith),
  ("prop_TL_splitWith", mytest prop_TL_splitWith),
  ("prop_T_breakSubstringC", mytest prop_T_breakSubstringC),
  ("prop_T_breakSubstring_isInfixOf", mytest prop_T_breakSubstring_isInfixOf),

  ("prop_T_lines", mytest prop_T_lines),
  ("prop_TL_lines", mytest prop_TL_lines),
--("prop_T_lines'", mytest prop_T_lines'),
  ("prop_T_words", mytest prop_T_words),
  ("prop_TL_words", mytest prop_TL_words),
  ("prop_T_unlines", mytest prop_T_unlines),
  ("prop_TL_unlines", mytest prop_TL_unlines),
  ("prop_TL_unwords", mytest prop_TL_unwords),

  ("prop_S_isPrefixOf", mytest prop_S_isPrefixOf),
  ("prop_T_isPrefixOf", mytest prop_T_isPrefixOf),
  ("prop_TL_isPrefixOf", mytest prop_TL_isPrefixOf),
  ("prop_T_isSuffixOf", mytest prop_T_isSuffixOf),
  ("prop_TL_isSuffixOf", mytest prop_TL_isSuffixOf),
  ("prop_T_isInfixOf", mytest prop_T_isInfixOf),
  ("prop_TL_isInfixOf", mytest prop_TL_isInfixOf),

  ("prop_T_elem", mytest prop_T_elem),
  ("prop_TL_elem", mytest prop_TL_elem),
  ("prop_T_filter", mytest prop_T_filter),
  ("prop_TL_filter", mytest prop_TL_filter),
  ("prop_T_find", mytest prop_T_find),
  ("prop_TL_find", mytest prop_TL_find),
  ("prop_T_partition", mytest prop_T_partition),
  ("prop_TL_partition", mytest prop_TL_partition),

  ("prop_T_index", mytest prop_T_index),
  ("prop_T_findIndex", mytest prop_T_findIndex),
  ("prop_TL_findIndex", mytest prop_TL_findIndex),
  ("prop_T_findIndices", mytest prop_T_findIndices),
  ("prop_TL_findIndices", mytest prop_TL_findIndices),
  ("prop_T_elemIndex", mytest prop_T_elemIndex),
  ("prop_TL_elemIndex", mytest prop_TL_elemIndex),
  ("prop_T_elemIndices", mytest prop_T_elemIndices),
  ("prop_TL_elemIndices", mytest prop_TL_elemIndices),
  ("prop_T_count", mytest prop_T_count),
  ("prop_TL_count", mytest prop_TL_count),
  ("prop_T_zip", mytest prop_T_zip),
  ("prop_TL_zip", mytest prop_TL_zip),
  ("prop_T_zipWith", mytest prop_T_zipWith),
  ("prop_TL_zipWith", mytest prop_TL_zipWith),

  ("prop_S_filter_eq", mytest prop_S_filter_eq)
  ]
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.