mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Gutted catch_compiler_capabilities
All C++11 toggles are now removed. What is left is either platform specific (POSIX_SIGNALS, WINDOWS_SEH), or possibly still needed (USE_COUNTER). If current CLion is compatible with `__COUNTER__`, then we should also force `__COUNTER__` usage. Changed * CATCH_AUTO_PTR -> std::unique_ptr * CATCH_OVERRIDE -> override * CATCH_NULL -> nullptr * CATCH_NOEXCEPT -> noexcept * CATCH_NOEXCEPT_IS -> noexcept Removed * CATCH_CONFIG_CPP11_UNIQUE_PTR * CATCH_CONFIG_CPP11_SHUFFLE * CATCH_CONFIG_CPP11_TYPE_TRAITS * CATCH_CONFIG_CPP11_OVERRIDE * CATCH_CONFIG_CPP11_LONG_LONG * CATCH_CONFIG_CPP11_TUPLE * CATCH_CONFIG_CPP11_IS_ENUM * CATCH_CONFIG_CPP11_GENERATED_METHODS * CATCH_CONFIG_CPP11_NOEXCEPT * CATCH_CONFIG_CPP11_NULLPTR * CATCH_CONFIG_VARIADIC_MACROS
This commit is contained in:
@@ -27,11 +27,11 @@ namespace Catch {
|
||||
return "Reports test results in the format of Automake .trs files";
|
||||
}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual void assertionStarting( AssertionInfo const& ) override {}
|
||||
|
||||
virtual bool assertionEnded( AssertionStats const& /*_assertionStats*/ ) CATCH_OVERRIDE { return true; }
|
||||
virtual bool assertionEnded( AssertionStats const& /*_assertionStats*/ ) override { return true; }
|
||||
|
||||
virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) override {
|
||||
// Possible values to emit are PASS, XFAIL, SKIP, FAIL, XPASS and ERROR.
|
||||
stream << ":test-result: ";
|
||||
if (_testCaseStats.totals.assertions.allPassed()) {
|
||||
@@ -45,7 +45,7 @@ namespace Catch {
|
||||
StreamingReporterBase::testCaseEnded( _testCaseStats );
|
||||
}
|
||||
|
||||
virtual void skipTest( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
virtual void skipTest( TestCaseInfo const& testInfo ) override {
|
||||
stream << ":test-result: SKIP " << testInfo.name << '\n';
|
||||
}
|
||||
|
||||
|
@@ -50,44 +50,44 @@ namespace Catch {
|
||||
m_reporterPrefs.shouldRedirectStdOut = false;
|
||||
}
|
||||
|
||||
virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE {
|
||||
virtual ReporterPreferences getPreferences() const override {
|
||||
return m_reporterPrefs;
|
||||
}
|
||||
|
||||
virtual ~StreamingReporterBase() CATCH_OVERRIDE;
|
||||
virtual ~StreamingReporterBase() override;
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& ) CATCH_OVERRIDE {}
|
||||
virtual void noMatchingTestCases( std::string const& ) override {}
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& _testRunInfo ) CATCH_OVERRIDE {
|
||||
virtual void testRunStarting( TestRunInfo const& _testRunInfo ) override {
|
||||
currentTestRunInfo = _testRunInfo;
|
||||
}
|
||||
virtual void testGroupStarting( GroupInfo const& _groupInfo ) CATCH_OVERRIDE {
|
||||
virtual void testGroupStarting( GroupInfo const& _groupInfo ) override {
|
||||
currentGroupInfo = _groupInfo;
|
||||
}
|
||||
|
||||
virtual void testCaseStarting( TestCaseInfo const& _testInfo ) CATCH_OVERRIDE {
|
||||
virtual void testCaseStarting( TestCaseInfo const& _testInfo ) override {
|
||||
currentTestCaseInfo = _testInfo;
|
||||
}
|
||||
virtual void sectionStarting( SectionInfo const& _sectionInfo ) CATCH_OVERRIDE {
|
||||
virtual void sectionStarting( SectionInfo const& _sectionInfo ) override {
|
||||
m_sectionStack.push_back( _sectionInfo );
|
||||
}
|
||||
|
||||
virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) CATCH_OVERRIDE {
|
||||
virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) override {
|
||||
m_sectionStack.pop_back();
|
||||
}
|
||||
virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats */ ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats */ ) override {
|
||||
currentTestCaseInfo.reset();
|
||||
}
|
||||
virtual void testGroupEnded( TestGroupStats const& /* _testGroupStats */ ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& /* _testGroupStats */ ) override {
|
||||
currentGroupInfo.reset();
|
||||
}
|
||||
virtual void testRunEnded( TestRunStats const& /* _testRunStats */ ) CATCH_OVERRIDE {
|
||||
virtual void testRunEnded( TestRunStats const& /* _testRunStats */ ) override {
|
||||
currentTestCaseInfo.reset();
|
||||
currentGroupInfo.reset();
|
||||
currentTestRunInfo.reset();
|
||||
}
|
||||
|
||||
virtual void skipTest( TestCaseInfo const& ) CATCH_OVERRIDE {
|
||||
virtual void skipTest( TestCaseInfo const& ) override {
|
||||
// Don't do anything with this by default.
|
||||
// It can optionally be overridden in the derived class.
|
||||
}
|
||||
@@ -157,16 +157,16 @@ namespace Catch {
|
||||
}
|
||||
~CumulativeReporterBase();
|
||||
|
||||
virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE {
|
||||
virtual ReporterPreferences getPreferences() const override {
|
||||
return m_reporterPrefs;
|
||||
}
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual void testGroupStarting( GroupInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual void testRunStarting( TestRunInfo const& ) override {}
|
||||
virtual void testGroupStarting( GroupInfo const& ) override {}
|
||||
|
||||
virtual void testCaseStarting( TestCaseInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual void testCaseStarting( TestCaseInfo const& ) override {}
|
||||
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE {
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) override {
|
||||
SectionStats incompleteStats( sectionInfo, Counts(), 0, false );
|
||||
Ptr<SectionNode> node;
|
||||
if( m_sectionStack.empty() ) {
|
||||
@@ -191,9 +191,9 @@ namespace Catch {
|
||||
m_deepestSection = node;
|
||||
}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual void assertionStarting( AssertionInfo const& ) override {}
|
||||
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE {
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) override {
|
||||
assert( !m_sectionStack.empty() );
|
||||
SectionNode& sectionNode = *m_sectionStack.back();
|
||||
sectionNode.assertions.push_back( assertionStats );
|
||||
@@ -205,13 +205,13 @@ namespace Catch {
|
||||
prepareExpandedExpression( sectionNode.assertions.back().assertionResult );
|
||||
return true;
|
||||
}
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE {
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) override {
|
||||
assert( !m_sectionStack.empty() );
|
||||
SectionNode& node = *m_sectionStack.back();
|
||||
node.stats = sectionStats;
|
||||
m_sectionStack.pop_back();
|
||||
}
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) override {
|
||||
Ptr<TestCaseNode> node = new TestCaseNode( testCaseStats );
|
||||
assert( m_sectionStack.size() == 0 );
|
||||
node->children.push_back( m_rootSection );
|
||||
@@ -222,12 +222,12 @@ namespace Catch {
|
||||
m_deepestSection->stdOut = testCaseStats.stdOut;
|
||||
m_deepestSection->stdErr = testCaseStats.stdErr;
|
||||
}
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) override {
|
||||
Ptr<TestGroupNode> node = new TestGroupNode( testGroupStats );
|
||||
node->children.swap( m_testCases );
|
||||
m_testGroups.push_back( node );
|
||||
}
|
||||
virtual void testRunEnded( TestRunStats const& testRunStats ) CATCH_OVERRIDE {
|
||||
virtual void testRunEnded( TestRunStats const& testRunStats ) override {
|
||||
Ptr<TestRunNode> node = new TestRunNode( testRunStats );
|
||||
node->children.swap( m_testGroups );
|
||||
m_testRuns.push_back( node );
|
||||
@@ -235,7 +235,7 @@ namespace Catch {
|
||||
}
|
||||
virtual void testRunEndedCumulative() = 0;
|
||||
|
||||
virtual void skipTest( TestCaseInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual void skipTest( TestCaseInfo const& ) override {}
|
||||
|
||||
virtual void prepareExpandedExpression( AssertionResult& result ) const {
|
||||
if( result.isOk() )
|
||||
@@ -276,8 +276,8 @@ namespace Catch {
|
||||
: StreamingReporterBase( _config )
|
||||
{}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {}
|
||||
virtual bool assertionEnded( AssertionStats const& ) CATCH_OVERRIDE {
|
||||
virtual void assertionStarting( AssertionInfo const& ) override {}
|
||||
virtual bool assertionEnded( AssertionStats const& ) override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
@@ -58,7 +58,7 @@ namespace Catch {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void sectionEnded(SectionStats const& _sectionStats) CATCH_OVERRIDE {
|
||||
virtual void sectionEnded(SectionStats const& _sectionStats) override {
|
||||
if (m_config->showDurations() == ShowDurations::Always) {
|
||||
stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl;
|
||||
}
|
||||
|
@@ -25,19 +25,19 @@ namespace Catch {
|
||||
m_headerPrinted( false )
|
||||
{}
|
||||
|
||||
virtual ~ConsoleReporter() CATCH_OVERRIDE;
|
||||
virtual ~ConsoleReporter() override;
|
||||
static std::string getDescription() {
|
||||
return "Reports test results as plain lines of text";
|
||||
}
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& spec ) CATCH_OVERRIDE {
|
||||
virtual void noMatchingTestCases( std::string const& spec ) override {
|
||||
stream << "No test cases matched '" << spec << '\'' << std::endl;
|
||||
}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {
|
||||
virtual void assertionStarting( AssertionInfo const& ) override {
|
||||
}
|
||||
|
||||
virtual bool assertionEnded( AssertionStats const& _assertionStats ) CATCH_OVERRIDE {
|
||||
virtual bool assertionEnded( AssertionStats const& _assertionStats ) override {
|
||||
AssertionResult const& result = _assertionStats.assertionResult;
|
||||
|
||||
bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();
|
||||
@@ -54,11 +54,11 @@ namespace Catch {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void sectionStarting( SectionInfo const& _sectionInfo ) CATCH_OVERRIDE {
|
||||
virtual void sectionStarting( SectionInfo const& _sectionInfo ) override {
|
||||
m_headerPrinted = false;
|
||||
StreamingReporterBase::sectionStarting( _sectionInfo );
|
||||
}
|
||||
virtual void sectionEnded( SectionStats const& _sectionStats ) CATCH_OVERRIDE {
|
||||
virtual void sectionEnded( SectionStats const& _sectionStats ) override {
|
||||
if( _sectionStats.missingAssertions ) {
|
||||
lazyPrint();
|
||||
Colour colour( Colour::ResultError );
|
||||
@@ -77,11 +77,11 @@ namespace Catch {
|
||||
StreamingReporterBase::sectionEnded( _sectionStats );
|
||||
}
|
||||
|
||||
virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) override {
|
||||
StreamingReporterBase::testCaseEnded( _testCaseStats );
|
||||
m_headerPrinted = false;
|
||||
}
|
||||
virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) override {
|
||||
if( currentGroupInfo.used ) {
|
||||
printSummaryDivider();
|
||||
stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':\n";
|
||||
@@ -90,7 +90,7 @@ namespace Catch {
|
||||
}
|
||||
StreamingReporterBase::testGroupEnded( _testGroupStats );
|
||||
}
|
||||
virtual void testRunEnded( TestRunStats const& _testRunStats ) CATCH_OVERRIDE {
|
||||
virtual void testRunEnded( TestRunStats const& _testRunStats ) override {
|
||||
printTotalsDivider( _testRunStats.totals );
|
||||
printTotals( _testRunStats.totals );
|
||||
stream << std::endl;
|
||||
@@ -218,10 +218,10 @@ namespace Catch {
|
||||
void printMessage() const {
|
||||
if( !messageLabel.empty() )
|
||||
stream << messageLabel << ':' << '\n';
|
||||
for( auto const& message : messages ) {
|
||||
for( auto const& msg : messages ) {
|
||||
// If this assertion is a warning ignore any INFO messages
|
||||
if( printInfoMessages || message.type != ResultWas::Info )
|
||||
stream << Text( message.message, TextAttributes().setIndent(2) ) << '\n';
|
||||
if( printInfoMessages || msg.type != ResultWas::Info )
|
||||
stream << Text( msg.message, TextAttributes().setIndent(2) ) << '\n';
|
||||
}
|
||||
}
|
||||
void printSourceInfo() const {
|
||||
|
@@ -57,20 +57,20 @@ namespace Catch {
|
||||
m_reporterPrefs.shouldRedirectStdOut = true;
|
||||
}
|
||||
|
||||
virtual ~JunitReporter() CATCH_OVERRIDE;
|
||||
virtual ~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*/ ) CATCH_OVERRIDE {}
|
||||
virtual void noMatchingTestCases( std::string const& /*spec*/ ) override {}
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& runInfo ) CATCH_OVERRIDE {
|
||||
virtual void testRunStarting( TestRunInfo const& runInfo ) override {
|
||||
CumulativeReporterBase::testRunStarting( runInfo );
|
||||
xml.startElement( "testsuites" );
|
||||
}
|
||||
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE {
|
||||
virtual 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 ) CATCH_OVERRIDE {
|
||||
virtual void testCaseStarting( TestCaseInfo const& testCaseInfo ) override {
|
||||
m_okToFail = testCaseInfo.okToFail();
|
||||
}
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE {
|
||||
virtual 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 ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) override {
|
||||
stdOutForSuite << testCaseStats.stdOut;
|
||||
stdErrForSuite << testCaseStats.stdErr;
|
||||
CumulativeReporterBase::testCaseEnded( testCaseStats );
|
||||
}
|
||||
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) override {
|
||||
double suiteTime = suiteTimer.getElapsedSeconds();
|
||||
CumulativeReporterBase::testGroupEnded( testGroupStats );
|
||||
writeGroup( *m_testGroups.back(), suiteTime );
|
||||
}
|
||||
|
||||
virtual void testRunEndedCumulative() CATCH_OVERRIDE {
|
||||
virtual void testRunEndedCumulative() override {
|
||||
xml.endElement();
|
||||
}
|
||||
|
||||
|
@@ -23,79 +23,79 @@ public:
|
||||
|
||||
public: // IStreamingReporter
|
||||
|
||||
virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE {
|
||||
virtual ReporterPreferences getPreferences() const override {
|
||||
return m_reporters[0]->getPreferences();
|
||||
}
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& spec ) CATCH_OVERRIDE {
|
||||
virtual void noMatchingTestCases( std::string const& spec ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->noMatchingTestCases( spec );
|
||||
}
|
||||
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& testRunInfo ) CATCH_OVERRIDE {
|
||||
virtual void testRunStarting( TestRunInfo const& testRunInfo ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->testRunStarting( testRunInfo );
|
||||
}
|
||||
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE {
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->testGroupStarting( groupInfo );
|
||||
}
|
||||
|
||||
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->testCaseStarting( testInfo );
|
||||
}
|
||||
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE {
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->sectionStarting( sectionInfo );
|
||||
}
|
||||
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& assertionInfo ) CATCH_OVERRIDE {
|
||||
virtual void assertionStarting( AssertionInfo const& assertionInfo ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->assertionStarting( assertionInfo );
|
||||
}
|
||||
|
||||
|
||||
// The return value indicates if the messages buffer should be cleared:
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE {
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) override {
|
||||
bool clearBuffer = false;
|
||||
for( auto const& reporter : m_reporters )
|
||||
clearBuffer |= reporter->assertionEnded( assertionStats );
|
||||
return clearBuffer;
|
||||
}
|
||||
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE {
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->sectionEnded( sectionStats );
|
||||
}
|
||||
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->testCaseEnded( testCaseStats );
|
||||
}
|
||||
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->testGroupEnded( testGroupStats );
|
||||
}
|
||||
|
||||
virtual void testRunEnded( TestRunStats const& testRunStats ) CATCH_OVERRIDE {
|
||||
virtual void testRunEnded( TestRunStats const& testRunStats ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->testRunEnded( testRunStats );
|
||||
}
|
||||
|
||||
|
||||
virtual void skipTest( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
virtual void skipTest( TestCaseInfo const& testInfo ) override {
|
||||
for( auto const& reporter : m_reporters )
|
||||
reporter->skipTest( testInfo );
|
||||
}
|
||||
|
||||
virtual MultipleReporters* tryAsMulti() CATCH_OVERRIDE {
|
||||
virtual MultipleReporters* tryAsMulti() override {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@@ -43,33 +43,33 @@ namespace Catch {
|
||||
replaceInPlace( escaped, "]", "|]" );
|
||||
return escaped;
|
||||
}
|
||||
virtual ~TeamCityReporter() CATCH_OVERRIDE;
|
||||
virtual ~TeamCityReporter() override;
|
||||
|
||||
static std::string getDescription() {
|
||||
return "Reports test results as TeamCity service messages";
|
||||
}
|
||||
|
||||
virtual void skipTest( TestCaseInfo const& /* testInfo */ ) CATCH_OVERRIDE {
|
||||
virtual void skipTest( TestCaseInfo const& /* testInfo */ ) override {
|
||||
}
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& /* spec */ ) CATCH_OVERRIDE {}
|
||||
virtual void noMatchingTestCases( std::string const& /* spec */ ) override {}
|
||||
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE {
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) override {
|
||||
StreamingReporterBase::testGroupStarting( groupInfo );
|
||||
stream << "##teamcity[testSuiteStarted name='"
|
||||
<< escape( groupInfo.name ) << "']\n";
|
||||
}
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) override {
|
||||
StreamingReporterBase::testGroupEnded( testGroupStats );
|
||||
stream << "##teamcity[testSuiteFinished name='"
|
||||
<< escape( testGroupStats.groupInfo.name ) << "']\n";
|
||||
}
|
||||
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {
|
||||
virtual void assertionStarting( AssertionInfo const& ) override {
|
||||
}
|
||||
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE {
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) override {
|
||||
AssertionResult const& result = assertionStats.assertionResult;
|
||||
if( !result.isOk() ) {
|
||||
|
||||
@@ -140,18 +140,18 @@ namespace Catch {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE {
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) override {
|
||||
m_headerPrintedForThisSection = false;
|
||||
StreamingReporterBase::sectionStarting( sectionInfo );
|
||||
}
|
||||
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) override {
|
||||
StreamingReporterBase::testCaseStarting( testInfo );
|
||||
stream << "##teamcity[testStarted name='"
|
||||
<< escape( testInfo.name ) << "']\n";
|
||||
}
|
||||
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) override {
|
||||
StreamingReporterBase::testCaseEnded( testCaseStats );
|
||||
if( !testCaseStats.stdOut.empty() )
|
||||
stream << "##teamcity[testStdOut name='"
|
||||
|
@@ -26,7 +26,7 @@ namespace Catch {
|
||||
m_reporterPrefs.shouldRedirectStdOut = true;
|
||||
}
|
||||
|
||||
virtual ~XmlReporter() CATCH_OVERRIDE;
|
||||
virtual ~XmlReporter() override;
|
||||
|
||||
static std::string getDescription() {
|
||||
return "Reports test results as an XML document";
|
||||
@@ -44,11 +44,11 @@ namespace Catch {
|
||||
|
||||
public: // StreamingReporterBase
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& s ) CATCH_OVERRIDE {
|
||||
virtual void noMatchingTestCases( std::string const& s ) override {
|
||||
StreamingReporterBase::noMatchingTestCases( s );
|
||||
}
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
virtual void testRunStarting( TestRunInfo const& testInfo ) override {
|
||||
StreamingReporterBase::testRunStarting( testInfo );
|
||||
std::string stylesheetRef = getStylesheetRef();
|
||||
if( !stylesheetRef.empty() )
|
||||
@@ -58,13 +58,13 @@ namespace Catch {
|
||||
m_xml.writeAttribute( "name", m_config->name() );
|
||||
}
|
||||
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE {
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) override {
|
||||
StreamingReporterBase::testGroupStarting( groupInfo );
|
||||
m_xml.startElement( "Group" )
|
||||
.writeAttribute( "name", groupInfo.name );
|
||||
}
|
||||
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) override {
|
||||
StreamingReporterBase::testCaseStarting(testInfo);
|
||||
m_xml.startElement( "TestCase" )
|
||||
.writeAttribute( "name", trim( testInfo.name ) )
|
||||
@@ -78,7 +78,7 @@ namespace Catch {
|
||||
m_xml.ensureTagClosed();
|
||||
}
|
||||
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE {
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) override {
|
||||
StreamingReporterBase::sectionStarting( sectionInfo );
|
||||
if( m_sectionDepth++ > 0 ) {
|
||||
m_xml.startElement( "Section" )
|
||||
@@ -89,9 +89,9 @@ namespace Catch {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE { }
|
||||
virtual void assertionStarting( AssertionInfo const& ) override { }
|
||||
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE {
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) override {
|
||||
|
||||
AssertionResult const& result = assertionStats.assertionResult;
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace Catch {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE {
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) override {
|
||||
StreamingReporterBase::sectionEnded( sectionStats );
|
||||
if( --m_sectionDepth > 0 ) {
|
||||
XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" );
|
||||
@@ -181,7 +181,7 @@ namespace Catch {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE {
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) override {
|
||||
StreamingReporterBase::testCaseEnded( testCaseStats );
|
||||
XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResult" );
|
||||
e.writeAttribute( "success", testCaseStats.totals.assertions.allOk() );
|
||||
@@ -197,7 +197,7 @@ namespace Catch {
|
||||
m_xml.endElement();
|
||||
}
|
||||
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE {
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) override {
|
||||
StreamingReporterBase::testGroupEnded( testGroupStats );
|
||||
// TODO: Check testGroupStats.aborting and act accordingly.
|
||||
m_xml.scopedElement( "OverallResults" )
|
||||
@@ -207,7 +207,7 @@ namespace Catch {
|
||||
m_xml.endElement();
|
||||
}
|
||||
|
||||
virtual void testRunEnded( TestRunStats const& testRunStats ) CATCH_OVERRIDE {
|
||||
virtual void testRunEnded( TestRunStats const& testRunStats ) override {
|
||||
StreamingReporterBase::testRunEnded( testRunStats );
|
||||
m_xml.scopedElement( "OverallResults" )
|
||||
.writeAttribute( "successes", testRunStats.totals.assertions.passed )
|
||||
|
Reference in New Issue
Block a user