pFUnit icon indicating copy to clipboard operation
pFUnit copied to clipboard

Add ability to match a pattern for an exception in addition to an exact string match

Open ekluzek opened this issue 4 years ago • 1 comments

In our code we have some preprocessing that adds the line number to some aborts that happen to make it easier to find. This is great except for our PfUnit unit testing, as if the line number happens to change -- the unit test will also fail even if everything else is the same. So what I'd like to be able to do is to do a pattern match in the exception handling rather than have to include the line number in the match. I'd just like to see this as an option, not the standard way to do things.

ekluzek avatar Sep 30 '19 16:09 ekluzek

I certainly agree that checking the specific line number is fragile (as well as uninformative).

Could you post a concrete (hopefully simple) example of what you have in mind?

tclune avatar Oct 07 '19 00:10 tclune