diff options
| author | Martin Hořeňovský | 2022-05-10 20:00:36 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-05-10 20:57:59 +0200 |
| commit | 5a49285e9cf203dd20b00ac7488a6a3233d60fff (patch) | |
| tree | 0a232d7ec81e8f34d37d7fbbe7ccc2f212671eb2 /src/catch2/interfaces | |
| parent | ae475a3c19e9b770e66ea3a2ce3eaa2debecd4c6 (diff) | |
| download | catch3-5a49285e9cf203dd20b00ac7488a6a3233d60fff.tar.gz | |
Add --list-listeners option
Diffstat (limited to 'src/catch2/interfaces')
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_reporter.hpp | 4 | ||||
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_reporter_factory.hpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index 1a2736f7..42192438 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -27,6 +27,7 @@ namespace Catch { struct ReporterDescription; + struct ListenerDescription; struct TagInfo; struct TestCaseInfo; class TestCaseHandle; @@ -249,11 +250,12 @@ namespace Catch { //! Writes out information about provided reporters using reporter-specific format virtual void listReporters(std::vector<ReporterDescription> const& descriptions) = 0; + //! Writes out the provided listeners descriptions using reporter-specific format + virtual void listListeners(std::vector<ListenerDescription> const& descriptions) = 0; //! Writes out information about provided tests using reporter-specific format virtual void listTests(std::vector<TestCaseHandle> const& tests) = 0; //! Writes out information about the provided tags using reporter-specific format virtual void listTags(std::vector<TagInfo> const& tags) = 0; - }; using IEventListenerPtr = Detail::unique_ptr<IEventListener>; diff --git a/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp b/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp index 76dce504..323edde2 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp @@ -9,6 +9,7 @@ #define CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED #include <catch2/internal/catch_unique_ptr.hpp> +#include <catch2/internal/catch_stringref.hpp> #include <string> @@ -34,6 +35,9 @@ namespace Catch { public: virtual ~EventListenerFactory(); // = default virtual IEventListenerPtr create( IConfig const* config ) const = 0; + //! Return a meaningful name for the listener, e.g. its type name + virtual StringRef getName() const = 0; + //! Return listener's description if available virtual std::string getDescription() const = 0; }; } // namespace Catch |