Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Clear the assert stack if an assert dies in the middle and is caught #122

Closed schwernbot closed 10 years ago

schwernbot commented 10 years ago

From: @schwern Date: Monday Dec 27, 2010 at 13:08 GMT Orig: https://github.com/Test-More/test-more/issues/93

If an assert dies, say with a watcher that dies on failure, the assert stack will remain. Any following asserts will be using the stale stack and will never reach the time.

Probably requires putting an eval around each assert to catch the error, clear the stack, and rethrow.

schwernbot commented 10 years ago

From: @schwern Date: Saturday Jan 08, 2011 at 08:55 GMT Orig: https://github.com/Test-More/test-more/issues/93#issuecomment-662270

I think I've fixed this in making die-on-fail work. Test it.

schwernbot commented 10 years ago

From: @schwern Date: Sunday Jan 09, 2011 at 07:19 GMT Orig: https://github.com/Test-More/test-more/issues/93#issuecomment-663905

Protect against an assert dying unexpectedly and leaving the assert stack in a bad state.

Whether the result of a dead assert should be displayed is something else.

Closed by 323873133a7d0a55d7e28aaf6555f3745b4bded7