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

Safe HaskellSafe
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 :: Either ParseError a -> Assertion Source

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

assertParseFailure :: Either ParseError a -> Assertion Source

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

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

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

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