-prop_readBytes :: String -> Int -> Result
-prop_readBytes s l =
- runStringConnection s (\c -> readBytes c (fromIntegral l)) @?=
- if l < 0
- then Left "readBytes: negative count"
- else case compare l (length s) of
- EQ -> Right (take l s, (drop l s, []))
- LT -> Right (take l s, (drop l s, []))
- GT -> Left "EOF in input in readBytes"
-
-q :: Testable a => String -> a -> HU.Test
-q = qccheck (defaultConfig {configMaxTest = 250, configMaxFail = 5000})
-
-allt = [q "Identity" prop_identity,
- q "Lines identity" prop_linesidentity,
- q "Lines list identity" prop_lineslistidentity,
- q "readline" prop_readLine,
- q "readBytes" prop_readBytes