hledger-lib-1.3: Core data types, parsers and functionality for the hledger accounting tools

Safe HaskellNone
LanguageHaskell2010

Hledger.Utils.Test

Synopsis

Documentation

testName :: Test -> String Source #

Get a Test's label, or the empty string.

flattenTests :: Test -> [Test] Source #

Flatten a Test containing TestLists into a list of single tests.

filterTests :: (Test -> Bool) -> Test -> Test Source #

Filter TestLists in a Test, recursively, preserving the structure.

is :: (Eq a, Show a) => a -> a -> Assertion Source #

Simple way to assert something is some expected value, with no label.

assertParse :: (Show t, Show e) => Either (ParseError t e) a -> Assertion Source #

Assert a parse result is successful, printing the parse error on failure.

assertParseFailure :: Either (ParseError t e) a -> Assertion Source #

Assert a parse result is successful, printing the parse error on failure.

assertParseEqual :: (Show a, Eq a, Show t, Show e) => Either (ParseError t e) a -> a -> Assertion Source #

Assert a parse result is some expected value, printing the parse error on failure.

printParseError :: Show a => a -> IO () Source #