Minor code cleanup.

This commit is contained in:
John MacFarlane 2011-01-14 18:09:16 -08:00
parent 0222f367b1
commit dc93073804

View file

@ -20,9 +20,15 @@ assertPandoc (Block e) (Pandoc _ [g] ) = e @=? g
assertPandoc (Blocks e) (Pandoc _ g ) = e @=? g
assertPandoc _ _ = assertFailure "Wrong structure of Pandoc document."
latexTest :: String-> String -> Expect -> Test
latexTest :: String -> String -> Expect -> Test
latexTest = readerTestWithState defaultParserState readLaTeX
readerTestWithState :: ParserState -> (ParserState -> String -> Pandoc) -> String -> String -> Expect -> Test
readerTestWithState state reader name string exp = testCase name $ exp `assertPandoc` reader state string
readerTestWithState :: ParserState
-> (ParserState -> String -> Pandoc)
-> String
-> String
-> Expect
-> Test
readerTestWithState state reader name string e =
testCase name $ e `assertPandoc` reader state string