summaryrefslogtreecommitdiff
path: root/tests/Tests/Helpers.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-14 18:09:16 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-14 18:09:16 -0800
commitdc93073804acecaf883d099ef3e1d067a29c9951 (patch)
tree2b4b201684cf809257bc8a6adb8dabb7a9e93324 /tests/Tests/Helpers.hs
parent0222f367b18ac4f77ab76751792c5757c2641d51 (diff)
Minor code cleanup.
Diffstat (limited to 'tests/Tests/Helpers.hs')
-rw-r--r--tests/Tests/Helpers.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/Tests/Helpers.hs b/tests/Tests/Helpers.hs
index e6d3640d9..539b26dcd 100644
--- a/tests/Tests/Helpers.hs
+++ b/tests/Tests/Helpers.hs
@@ -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