--list-* flags write to target specified by the -o flag

Also added tests for the default implementations of list* reporter
helpers.

Closes #2061
This commit is contained in:
Martin Hořeňovský committed 2021-01-26 18:36:54 +01:00
1 parent 6798c139a6
commit 971b1fc32a
17 files changed
+1965 -29

No files matched your search

@@ -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
@@ -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>;