| 1 |
-- Do not edit! Automatically created with doctest-extract from src/Data/List/Reverse/StrictElement.hs |
| 2 |
{-# LINE 15 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 3 |
|
| 4 |
module DocTest.Data.List.Reverse.StrictElement where |
| 5 |
|
| 6 |
import Data.List.Reverse.StrictElement |
| 7 |
import qualified Test.DocTest.Driver as DocTest |
| 8 |
|
| 9 |
{-# LINE 16 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 10 |
import Test.Utility (forAllPredicates, defined) |
| 11 |
import qualified Data.List.Reverse.StrictElement as Rev |
| 12 |
import qualified Data.List.Match as Match |
| 13 |
import qualified Data.List as List |
| 14 |
import Data.Tuple.HT (mapPair, swap) |
| 15 |
|
| 16 |
_suppressUnusedImportWarning :: (a -> Bool) -> [a] -> [a] |
| 17 |
_suppressUnusedImportWarning = Data.List.Reverse.StrictElement.dropWhile |
| 18 |
|
| 19 |
test :: DocTest.T () |
| 20 |
test = do |
| 21 |
DocTest.printPrefix "Data.List.Reverse.StrictElement:31: " |
| 22 |
{-# LINE 31 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 23 |
DocTest.property( |
| 24 |
{-# LINE 31 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 25 |
forAllPredicates $ \p xs -> Rev.dropWhile p xs == reverse (List.dropWhile p (reverse xs)) |
| 26 |
) |
| 27 |
DocTest.printPrefix "Data.List.Reverse.StrictElement:32: " |
| 28 |
{-# LINE 32 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 29 |
DocTest.property( |
| 30 |
{-# LINE 32 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 31 |
\x xs pad -> defined $ Match.take (pad::[()]) $ Rev.dropWhile ((x::Char)/=) $ cycle $ x:xs |
| 32 |
) |
| 33 |
DocTest.printPrefix "Data.List.Reverse.StrictElement:41: " |
| 34 |
{-# LINE 41 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 35 |
DocTest.property( |
| 36 |
{-# LINE 41 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 37 |
forAllPredicates $ \p xs -> Rev.takeWhile p xs == reverse (List.takeWhile p (reverse xs)) |
| 38 |
) |
| 39 |
DocTest.printPrefix "Data.List.Reverse.StrictElement:52: " |
| 40 |
{-# LINE 52 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 41 |
DocTest.property( |
| 42 |
{-# LINE 52 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 43 |
forAllPredicates $ \p xs -> Rev.span p xs == swap (mapPair (reverse, reverse) (List.span p (reverse xs))) |
| 44 |
) |
| 45 |
DocTest.printPrefix "Data.List.Reverse.StrictElement:53: " |
| 46 |
{-# LINE 53 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 47 |
DocTest.property( |
| 48 |
{-# LINE 53 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 49 |
forAllPredicates $ \p xs -> Rev.span p xs == (Rev.dropWhile p xs, Rev.takeWhile p xs) |
| 50 |
) |
| 51 |
DocTest.printPrefix "Data.List.Reverse.StrictElement:54: " |
| 52 |
{-# LINE 54 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 53 |
DocTest.property( |
| 54 |
{-# LINE 54 "src/Data/List/Reverse/StrictElement.hs" #-} |
| 55 |
\x xs pad -> defined $ Match.take (pad::[()]) $ fst $ Rev.span ((x::Char)/=) $ cycle $ x:xs |
| 56 |
) |