From 00e4bb51e47487fa146caee3bcbbacef51292acc Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 22 Feb 2021 23:56:04 +0100 Subject: tests: print accurate location if a test fails Ensures that tasty-hunit reports the location of the failing test instead of the location of the helper `test` function. --- test/Tests/Helpers.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Tests/Helpers.hs b/test/Tests/Helpers.hs index 31e727a66..64c2785ed 100644 --- a/test/Tests/Helpers.hs +++ b/test/Tests/Helpers.hs @@ -35,7 +35,7 @@ import Text.Pandoc.Shared (trimr) import Text.Pandoc.Writers.Native (writeNative) import Text.Printf -test :: (ToString a, ToString b, ToString c) +test :: (ToString a, ToString b, ToString c, HasCallStack) => (a -> b) -- ^ function to test -> String -- ^ name of test case -> (a, c) -- ^ (input, expected value) -- cgit v1.2.3