| 6727 | } |
| 6728 | |
| 6729 | virtual void handleFatalErrorCondition( std::string const& message ) { |
| 6730 | // Don't rebuild the result -- the stringification itself can cause more fatal errors |
| 6731 | // Instead, fake a result data. |
| 6732 | AssertionResultData tempResult; |
| 6733 | tempResult.resultType = ResultWas::FatalErrorCondition; |
| 6734 | tempResult.message = message; |
| 6735 | AssertionResult result(m_lastAssertionInfo, tempResult); |
| 6736 | |
| 6737 | getResultCapture().assertionEnded(result); |
| 6738 | |
| 6739 | handleUnfinishedSections(); |
| 6740 | |
| 6741 | // Recreate section for test case (as we will lose the one that was in scope) |
| 6742 | TestCaseInfo const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); |
| 6743 | SectionInfo testCaseSection( testCaseInfo.lineInfo, testCaseInfo.name, testCaseInfo.description ); |
| 6744 | |
| 6745 | Counts assertions; |
| 6746 | assertions.failed = 1; |
| 6747 | SectionStats testCaseSectionStats( testCaseSection, assertions, 0, false ); |
| 6748 | m_reporter->sectionEnded( testCaseSectionStats ); |
| 6749 | |
| 6750 | TestCaseInfo testInfo = m_activeTestCase->getTestCaseInfo(); |
| 6751 | |
| 6752 | Totals deltaTotals; |
| 6753 | deltaTotals.testCases.failed = 1; |
| 6754 | m_reporter->testCaseEnded( TestCaseStats( testInfo, |
| 6755 | deltaTotals, |
| 6756 | std::string(), |
| 6757 | std::string(), |
| 6758 | false ) ); |
| 6759 | m_totals.testCases.failed++; |
| 6760 | testGroupEnded( std::string(), m_totals, 1, 1 ); |
| 6761 | m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, false ) ); |
| 6762 | } |
| 6763 | |
| 6764 | public: |
| 6765 | // !TBD We need to do this another way! |
no test coverage detected