From 1fced57c813f190ea359d0b96f47349ed0ecc47f Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 3 Sep 2018 15:30:27 -0700 Subject: [PATCH] lib: export expectEq' helper --- hledger-lib/Hledger/Utils/Test.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Utils/Test.hs b/hledger-lib/Hledger/Utils/Test.hs index 15c8de38b..a51242b9c 100644 --- a/hledger-lib/Hledger/Utils/Test.hs +++ b/hledger-lib/Hledger/Utils/Test.hs @@ -12,6 +12,7 @@ module Hledger.Utils.Test ( ,_test ,it ,_it + ,expectEq' ,expectParse ,expectParseError ,expectParseEq @@ -101,7 +102,7 @@ runEasyTests args easytests = (do -- | Like easytest's expectEq, but pretty-prints the values in the failure output. expectEq' :: (Eq a, Show a, HasCallStack) => a -> a -> E.Test () expectEq' x y = if x == y then E.ok else E.crash $ - "expected:\n" <> T.pack (pshow x) <> "\nbut got:\n" <> T.pack (pshow y) <> "\n" + "\nexpected:\n" <> T.pack (pshow x) <> "\nbut got:\n" <> T.pack (pshow y) <> "\n" -- | Test that this stateful parser runnable in IO successfully parses -- all of the given input text, showing the parse error if it fails.