Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 08:52:14

0001 
0002 //              Copyright Catch2 Authors
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //   (See accompanying file LICENSE.txt or copy at
0005 //        https://www.boost.org/LICENSE_1_0.txt)
0006 
0007 // SPDX-License-Identifier: BSL-1.0
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 
0023         static std::string getDescription() {
0024             using namespace std::string_literals;
0025             return "Reports test results in TAP format, suitable for test harnesses"s;
0026         }
0027 
0028         void testRunStarting( TestRunInfo const& testInfo ) override;
0029 
0030         void noMatchingTestCases( StringRef unmatchedSpec ) override;
0031 
0032         void assertionEnded(AssertionStats const& _assertionStats) override;
0033 
0034         void testRunEnded(TestRunStats const& _testRunStats) override;
0035 
0036     private:
0037         std::size_t counter = 0;
0038     };
0039 
0040 } // end namespace Catch
0041 
0042 #endif // CATCH_REPORTER_TAP_HPP_INCLUDED