Closed hbirler closed 5 months ago
I am not familiar with the internals of Catch2, so there might be a nicer way of doing this. For example, I am not sure whether it is possible to properly construct SectionEndInfo endInfo
with correct prevAssertions
and durationInSeconds
Additionally, it might be safe to do:
auto nl = CATCH_MOVE(m_activeSections.back()->nameAndLocation());
instead of a copy, but I took the "safe" route (allocating memory might also not be the best idea within a signal handler).
Attention: Patch coverage is 0%
with 5 lines
in your changes are missing coverage. Please review.
Project coverage is 91.04%. Comparing base (
029fe3b
) to head (fe428d6
). Report is 5 commits behind head on devel.:exclamation: Current head fe428d6 differs from pull request most recent head 0b013eb. Consider uploading reports for the commit 0b013eb to get more accurate results
The function RunContext::handleFatalErrorCondition
seems to not be covered at all by the existing tests, and I wouldn't know how to test signal handlers reliably within the existing framework.
Thanks, this has been around for a while.
Closes #1210
When a signal is caught, the destructors of Sections will not be called. Thus, we must call
sectionEndedEarly
manually for those Sections.Example test case: