Remove superfluous IConfig argument from IStreamingReporter::list*

The previous commit made it so that the `IConfig` is stored in
`IStreamingReporter` and thus always available.
This commit is contained in:
Martin Hořeňovský
2021-01-16 15:48:29 +01:00
parent 74f2f4ba5e
commit 5509ceff60
9 changed files with 45 additions and 50 deletions
+5 -5
View File
@@ -24,7 +24,7 @@ namespace Catch {
void listTests(IStreamingReporter& reporter, IConfig const& config) {
auto const& testSpec = config.testSpec();
auto matchedTestCases = filterTests(getAllTestCasesSorted(config), testSpec, config);
reporter.listTests(matchedTestCases, config);
reporter.listTests(matchedTestCases);
}
void listTags(IStreamingReporter& reporter, IConfig const& config) {
@@ -46,10 +46,10 @@ namespace Catch {
infos.push_back(std::move(tagc.second));
}
reporter.listTags(infos, config);
reporter.listTags(infos);
}
void listReporters(IStreamingReporter& reporter, IConfig const& config) {
void listReporters(IStreamingReporter& reporter) {
std::vector<ReporterDescription> descriptions;
IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
@@ -58,7 +58,7 @@ namespace Catch {
descriptions.push_back({ fac.first, fac.second->getDescription() });
}
reporter.listReporters(descriptions, config);
reporter.listReporters(descriptions);
}
} // end anonymous namespace
@@ -96,7 +96,7 @@ namespace Catch {
}
if (config.listReporters()) {
listed = true;
listReporters(reporter, config);
listReporters(reporter);
}
return listed;
}