Update to allow all self tests to be run and to allow running with tags

This commit is contained in:
Malcolm Noyes
2013-12-09 14:18:35 +00:00
parent dd8c13a9e1
commit 36cb967220
21 changed files with 1402 additions and 843 deletions

View File

@@ -49,18 +49,24 @@ namespace Catch {
MSTestReporter( ReporterConfig const& _config )
: m_config( _config.fullConfig() ),
m_headerPrinted( false ),
m_atLeastOneTestCasePrinted( false )
m_atLeastOneTestCasePrinted( false ),
m_failed(0)
{}
MSTestReporter( Ptr<IConfig> const& _fullConfig )
: m_config( _fullConfig ),
m_headerPrinted( false ),
m_atLeastOneTestCasePrinted( false )
m_atLeastOneTestCasePrinted( false ),
m_failed(0)
{}
virtual ~MSTestReporter() {
if( m_atLeastOneTestCasePrinted ) {
write_output_message(stream.str());
/*if( m_failed )
{
Assert::IsTrue(false, L"At least one test failed - examine output for failures.");
}*/
}
}
@@ -126,9 +132,6 @@ namespace Catch {
write_output_message(_testCaseStats.stdErr);
write_output_message(getDoubleDashes());
}
if( _testCaseStats.totals.assertions.failed ) {
Assert::IsTrue(false, L"At least one test failed - examine output for CHECK failures.");
}
m_headerPrinted = false;
currentTestCaseInfo.reset();
assert( m_sectionStack.empty() );
@@ -147,6 +150,7 @@ namespace Catch {
printTotalsDivider();
printTotals( _testRunStats.totals );
stream << "\r\n" << "\r\n";
m_failed = _testRunStats.totals.testCases.failed;
currentTestCaseInfo.reset();
currentGroupInfo.reset();
currentTestRunInfo.reset();
@@ -454,6 +458,7 @@ namespace Catch {
std::vector<SectionInfo> m_sectionStack;
bool m_headerPrinted;
bool m_atLeastOneTestCasePrinted;
size_t m_failed;
};
} // end namespace Catch