File indexing completed on 2025-01-18 09:54:07
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CATCH_REPORTER_TAP_HPP_INCLUDED
0009 #define CATCH_REPORTER_TAP_HPP_INCLUDED
0010
0011 #include <catch2/reporters/catch_reporter_streaming_base.hpp>
0012 #include <catch2/internal/catch_move_and_forward.hpp>
0013
0014 namespace Catch {
0015
0016 class TAPReporter final : public StreamingReporterBase {
0017 public:
0018 TAPReporter( ReporterConfig&& config ):
0019 StreamingReporterBase( CATCH_MOVE(config) ) {
0020 m_preferences.shouldReportAllAssertions = true;
0021 }
0022 ~TAPReporter() override = default;
0023
0024 static std::string getDescription() {
0025 using namespace std::string_literals;
0026 return "Reports test results in TAP format, suitable for test harnesses"s;
0027 }
0028
0029 void testRunStarting( TestRunInfo const& testInfo ) override;
0030
0031 void noMatchingTestCases( StringRef unmatchedSpec ) override;
0032
0033 void assertionEnded(AssertionStats const& _assertionStats) override;
0034
0035 void testRunEnded(TestRunStats const& _testRunStats) override;
0036
0037 private:
0038 std::size_t counter = 0;
0039 };
0040
0041 }
0042
0043 #endif