License | MIT |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | Good |
Safe Haskell | None |
Language | Haskell2010 |
extra loaders helpers
- katLoader :: Char -> String -> [String] -> TestResource (String, String)
- katLoaderSimple :: [String] -> TestResource (String, String)
- mapTestUnitValues :: (String -> a) -> TestResource (String, String) -> TestResource (String, a)
- mapTestUnits :: (TestUnit (String, a) -> TestUnit b) -> TestResource (String, a) -> TestResource b
- mapTestUnitValuesBase64 :: TestResource (String, String) -> TestResource (String, ByteString)
- mapTestUnitValuesBase16 :: TestResource (String, String) -> TestResource (String, ByteString)
- valueUnbase16 :: String -> ByteString
- valueUnbase64 :: String -> ByteString
- valueInteger :: String -> Integer
- valueHexInteger :: String -> Integer
- type TestResource a = [(String, TestGroup a)]
- type TestGroup a = [TestUnit a]
- type TestUnit a = [a]
Documentation
katLoaderSimple :: [String] -> TestResource (String, String) Source
From a simple KAT file, extract
- lines starting by #, are assumed to be comment
format should be the following:
skipped .. skipped .. [group1] f1= v1 f2= v2 ... f1= v3 f2= v4 ... [group2] ...
generic helpers on TestResource
mapTestUnitValues :: (String -> a) -> TestResource (String, String) -> TestResource (String, a) Source
mapTestUnits :: (TestUnit (String, a) -> TestUnit b) -> TestResource (String, a) -> TestResource b Source
common helpers on TestResource
mapTestUnitValuesBase64 :: TestResource (String, String) -> TestResource (String, ByteString) Source
mapTestUnitValuesBase16 :: TestResource (String, String) -> TestResource (String, ByteString) Source
common value decoding helpers
valueUnbase16 :: String -> ByteString Source
valueUnbase64 :: String -> ByteString Source
valueInteger :: String -> Integer Source
valueHexInteger :: String -> Integer Source
associated hierarchy of KAT types
type TestResource a = [(String, TestGroup a)] Source