removed redundant virtuals on override functions (and added a couple of overrides)

This commit is contained in:
Phil Nash
2017-07-20 15:57:17 +01:00
parent 74ab1cd94b
commit f0890dcdf8
23 changed files with 183 additions and 206 deletions

View File

@@ -57,20 +57,20 @@ namespace Catch {
m_reporterPrefs.shouldRedirectStdOut = true;
}
virtual ~JunitReporter() override;
~JunitReporter() override;
static std::string getDescription() {
return "Reports test results in an XML format that looks like Ant's junitreport target";
}
virtual void noMatchingTestCases( std::string const& /*spec*/ ) override {}
void noMatchingTestCases( std::string const& /*spec*/ ) override {}
virtual void testRunStarting( TestRunInfo const& runInfo ) override {
void testRunStarting( TestRunInfo const& runInfo ) override {
CumulativeReporterBase::testRunStarting( runInfo );
xml.startElement( "testsuites" );
}
virtual void testGroupStarting( GroupInfo const& groupInfo ) override {
void testGroupStarting( GroupInfo const& groupInfo ) override {
suiteTimer.start();
stdOutForSuite.str("");
stdErrForSuite.str("");
@@ -78,28 +78,28 @@ namespace Catch {
CumulativeReporterBase::testGroupStarting( groupInfo );
}
virtual void testCaseStarting( TestCaseInfo const& testCaseInfo ) override {
void testCaseStarting( TestCaseInfo const& testCaseInfo ) override {
m_okToFail = testCaseInfo.okToFail();
}
virtual bool assertionEnded( AssertionStats const& assertionStats ) override {
bool assertionEnded( AssertionStats const& assertionStats ) override {
if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail )
unexpectedExceptions++;
return CumulativeReporterBase::assertionEnded( assertionStats );
}
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) override {
void testCaseEnded( TestCaseStats const& testCaseStats ) override {
stdOutForSuite << testCaseStats.stdOut;
stdErrForSuite << testCaseStats.stdErr;
CumulativeReporterBase::testCaseEnded( testCaseStats );
}
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) override {
void testGroupEnded( TestGroupStats const& testGroupStats ) override {
double suiteTime = suiteTimer.getElapsedSeconds();
CumulativeReporterBase::testGroupEnded( testGroupStats );
writeGroup( *m_testGroups.back(), suiteTime );
}
virtual void testRunEndedCumulative() override {
void testRunEndedCumulative() override {
xml.endElement();
}