Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/interfaces
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-01-26 17:53:59 +0100
committerMartin Hořeňovský2021-01-26 18:36:54 +0100
commit971b1fc32a857caa10eb166f39442cee5237267b (patch)
treea4bb48202c96d1dd4b7efe83f98c2919d890d1c9 /src/catch2/interfaces
parent6798c139a65f97ce5ed0105a2a8adb28262ef7f7 (diff)
downloadcatch3-971b1fc32a857caa10eb166f39442cee5237267b.tar.gz
--list-* flags write to target specified by the -o flag
Also added tests for the default implementations of list* reporter helpers. Closes #2061
Diffstat (limited to 'src/catch2/interfaces')
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.cpp16
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.hpp6
2 files changed, 3 insertions, 19 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.cpp b/src/catch2/interfaces/catch_interfaces_reporter.cpp
index 29fafecf..19416130 100644
--- a/src/catch2/interfaces/catch_interfaces_reporter.cpp
+++ b/src/catch2/interfaces/catch_interfaces_reporter.cpp
@@ -108,20 +108,4 @@ namespace Catch {
void IStreamingReporter::fatalErrorEncountered( StringRef ) {}
- void IStreamingReporter::listReporters(std::vector<ReporterDescription> const& descriptions) {
- defaultListReporters(
- Catch::cout(), descriptions, m_config->verbosity() );
- }
-
- void IStreamingReporter::listTests(std::vector<TestCaseHandle> const& tests) {
- defaultListTests( Catch::cout(),
- tests,
- m_config->hasTestFilters(),
- m_config->verbosity() );
- }
-
- void IStreamingReporter::listTags(std::vector<TagInfo> const& tags) {
- defaultListTags( Catch::cout(), tags, m_config->hasTestFilters() );
- }
-
} // end namespace Catch
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp
index 5449cc22..5a4c31a8 100644
--- a/src/catch2/interfaces/catch_interfaces_reporter.hpp
+++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp
@@ -222,11 +222,11 @@ namespace Catch {
virtual void fatalErrorEncountered( StringRef name );
//! Writes out information about provided reporters using reporter-specific format
- virtual void listReporters(std::vector<ReporterDescription> const& descriptions);
+ virtual void listReporters(std::vector<ReporterDescription> const& descriptions) = 0;
//! Writes out information about provided tests using reporter-specific format
- virtual void listTests(std::vector<TestCaseHandle> const& tests);
+ 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);
+ virtual void listTags(std::vector<TagInfo> const& tags) = 0;
};
using IStreamingReporterPtr = Detail::unique_ptr<IStreamingReporter>;