Add support for catching std::terminate
and signals (SIGSEGV etc)
#35
Labels
enhancement
New feature or request
Milestone
Currently, if a test calls
std::terminate()
, the whole test application stops. We should be able to register a handler for the abort signal (doctest does this), report the failure, and continue with the next test.We need to be able to figure out who calls
std::terminate()
; if the test framework itself calls it (because of out-of-bounds access, or reaching a hard-coded limit), we should propagate the error and stop. Ideally we would implement this so that we can test for our own termination; perhaps the test runner function could register the abort handler just before starting the test?At any rate, this would allow us to support
REQUIRE_*
andFAIL
when exceptions are not used, if we make them usestd::terminate()
instead ofreturn
.The text was updated successfully, but these errors were encountered: