Do uncaught_exception checking before calling sectionEnded

- split the uncaught handling (adding to unfinishedSections) into separate method
This commit is contained in:
Phil Nash
2015-09-26 18:12:21 -07:00
parent d234ed1a67
commit 166ca2e819
4 changed files with 36 additions and 29 deletions
+12 -1
View File
@@ -9,6 +9,7 @@
#define TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED
#include "catch_common.h"
#include "catch_totals.hpp"
namespace Catch {
@@ -22,7 +23,17 @@ namespace Catch {
std::string description;
SourceLineInfo lineInfo;
};
struct SectionEndInfo {
SectionEndInfo( SectionInfo const& _sectionInfo, Counts const& _prevAssertions, double _durationInSeconds )
: sectionInfo( _sectionInfo ), prevAssertions( _prevAssertions ), durationInSeconds( _durationInSeconds )
{}
SectionInfo sectionInfo;
Counts prevAssertions;
double durationInSeconds;
};
} // end namespace Catch
#endif // TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED