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.
This commit is contained in:
Albert Krewinkel
2021-02-22 23:56:04 +01:00
parent d30791a381
commit 00e4bb51e4
+1 -1
View File
@@ -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)