Closed lapplislazuli closed 1 year ago
@lapplislazuli see https://hackage.haskell.org/package/base-4.16.3.0/docs/Data-Typeable.html#v:typeOf. Is it sufficient for your purposes?
Hi @Bodigrim
thanks for your answer!
I think this will not do, because all Tests have the same type TestTree
? Or am I missing something?
You are expected to unwrap SingleTest
and look at t
inside of it.
Thank you very much! That was the perfect hint I needed.
Hi,
I am currently working a bit with Tasty TestTrees and I am lacking the option to pattern-match for the origin of a test. I would like to be able to iterate over the tests and do different behavior for HUnit,QuickCheck or SmallCheck tests. Maybe I just missed something in the implementations or don't know a good Haskell feature, but I think it would be a small change that could help a variety of downstream tools (but I guess not many users directly).
Basically I would love to have a function
showOrigin :: TestTree -> Text
where Text is one of HUnit, QuickCheck, etc.