mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Update catch_reporter_tap.hpp
TAP format requires all results to be reported.
Removed extraneous preferences function (handled by parent)
Incorporated fix from 3d9e7db2e0
Simplified total printing
This commit is contained in:
parent
4565b826cf
commit
87d0197cbd
@ -209,10 +209,9 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TAPReporter::testRunEnded(TestRunStats const& _testRunStats) {
|
void TAPReporter::testRunEnded(TestRunStats const& _testRunStats) {
|
||||||
|
stream << "1.." << _testRunStats.totals.assertions.total();
|
||||||
if (_testRunStats.totals.testCases.total() == 0) {
|
if (_testRunStats.totals.testCases.total() == 0) {
|
||||||
stream << "1..0 # Skipped: No tests ran.";
|
stream << " # Skipped: No tests ran.";
|
||||||
} else {
|
|
||||||
stream << "1.." << counter;
|
|
||||||
}
|
}
|
||||||
stream << "\n\n" << std::flush;
|
stream << "\n\n" << std::flush;
|
||||||
StreamingReporterBase::testRunEnded(_testRunStats);
|
StreamingReporterBase::testRunEnded(_testRunStats);
|
||||||
|
@ -11,8 +11,10 @@ namespace Catch {
|
|||||||
|
|
||||||
struct TAPReporter : StreamingReporterBase {
|
struct TAPReporter : StreamingReporterBase {
|
||||||
|
|
||||||
using StreamingReporterBase::StreamingReporterBase;
|
TAPReporter( ReporterConfig const& config ):
|
||||||
|
StreamingReporterBase( config ) {
|
||||||
|
m_reporterPrefs.shouldReportAllAssertions = true;
|
||||||
|
}
|
||||||
~TAPReporter() override;
|
~TAPReporter() override;
|
||||||
|
|
||||||
static std::string getDescription() {
|
static std::string getDescription() {
|
||||||
@ -20,10 +22,6 @@ namespace Catch {
|
|||||||
return "Reports test results in TAP format, suitable for test harnesses"s;
|
return "Reports test results in TAP format, suitable for test harnesses"s;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReporterPreferences getPreferences() const override {
|
|
||||||
return m_reporterPrefs;
|
|
||||||
}
|
|
||||||
|
|
||||||
void noMatchingTestCases(std::string const& spec) override;
|
void noMatchingTestCases(std::string const& spec) override;
|
||||||
|
|
||||||
void assertionStarting( AssertionInfo const& ) override {}
|
void assertionStarting( AssertionInfo const& ) override {}
|
||||||
|
@ -3992,5 +3992,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
|||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
# xmlentitycheck
|
# xmlentitycheck
|
||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
1..1992
|
1..2000
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user