Fix handling of test failures due to uncaught exceptions
We don't just want to exit here, but `longjmp()` back to the conditional via a call to `DeepState_Fail()`. In doing so, we end up in the common `DeepState_CatchFail()` branch, which exits with the same nonzero error code, but also saves the test case if appropriate.
This commit is contained in:
@@ -423,7 +423,7 @@ static void DeepState_RunTest(struct DeepState_TestInfo *test) {
|
||||
|
||||
#if defined(__cplusplus) && defined(__cpp_exceptions)
|
||||
} catch(...) {
|
||||
exit(1);
|
||||
DeepState_Fail();
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user