raaz-0.3.10: Fast and type safe cryptography.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tests.Core.Utils

Synopsis

Documentation

with :: key -> (key -> Spec) -> Spec Source #

Run a spec with a give key.

storeAndThenLoad :: EndianStore a => a -> IO a Source #

Store and the load the given value.

allocCast :: BYTES Int -> (Ptr a -> IO c) -> IO c Source #

shortened :: String -> String Source #

Shorten a string to make it readable in tests.

blocks :: Primitive prim => Proxy prim -> Gen ByteString Source #

Generate bytestrings that are multiples of block size of a primitive.

feed :: (Testable pr, Show a) => Gen a -> (a -> IO pr) -> Property Source #

Run a property with a given generator.

repeated :: Monoid m => m -> Int -> m Source #