git.iko.soy/typeable/pandoc
on master help sign in
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.

commit00e4bb51e47487fa146caee3bcbbacef51292acc authorAlbert Krewinkel <albert@zeitkraut.de> dateMon 22 Feb 2021, 23:56 (6 years ago) parentd30791a
1 file changed+1−1
test/Tests/Helpers.hs+1−1
test/Tests/Helpers.hs+1−1
@@ -35,7 +35,7 @@ import Text.Pandoc.Shared (trimr)
3535import Text.Pandoc.Writers.Native (writeNative)
3636import Text.Printf
3737
38−test :: (ToString a, ToString b, ToString c)
38+test :: (ToString a, ToString b, ToString c, HasCallStack)
3939 => (a -> b) -- ^ function to test
4040 -> String -- ^ name of test case
4141 -> (a, c) -- ^ (input, expected value)