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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/interfaces/catch_interfaces_reporter.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-11 09:34:25 +0200
committerMartin Hořeňovský2020-08-11 09:39:00 +0200
commit6dc834526103e3b9ee7fab26a69cd7942924bd91 (patch)
treed0e24afeb76d611ee61a6b1440e87d1a11e910cb /src/catch2/interfaces/catch_interfaces_reporter.cpp
parent24b83edf8aca78c975c5589baf22a5de311498a7 (diff)
downloadcatch3-6dc834526103e3b9ee7fab26a69cd7942924bd91.tar.gz
IStreamingReporter::list* only uses IConfig instead of full Config
As the full `Config` is not needed, the TUs implementing the `list*` functions can require the less heavy header `catch_interfaces_config.hpp` instead of the much heavier `catch_config.hpp`. This commit also fixes up some other TUs that include `Config`, while using just `IConfig`, to cleanup the includes further.
Diffstat (limited to 'src/catch2/interfaces/catch_interfaces_reporter.cpp')
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.cpp b/src/catch2/interfaces/catch_interfaces_reporter.cpp
index 7e4dd9ef..93a1baad 100644
--- a/src/catch2/interfaces/catch_interfaces_reporter.cpp
+++ b/src/catch2/interfaces/catch_interfaces_reporter.cpp
@@ -7,7 +7,6 @@
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
-#include <catch2/catch_config.hpp>
#include <catch2/internal/catch_console_colour.hpp>
#include <catch2/internal/catch_console_width.hpp>
#include <catch2/catch_message.hpp>
@@ -110,7 +109,7 @@ namespace Catch {
void IStreamingReporter::fatalErrorEncountered( StringRef ) {}
- void IStreamingReporter::listReporters(std::vector<ReporterDescription> const& descriptions, Config const& config) {
+ void IStreamingReporter::listReporters(std::vector<ReporterDescription> const& descriptions, IConfig const& config) {
Catch::cout() << "Available reporters:\n";
const auto maxNameLen = std::max_element(descriptions.begin(), descriptions.end(),
[](ReporterDescription const& lhs, ReporterDescription const& rhs) { return lhs.name.size() < rhs.name.size(); })
@@ -137,10 +136,10 @@ namespace Catch {
Catch::cout() << std::endl;
}
- void IStreamingReporter::listTests(std::vector<TestCaseHandle> const& tests, Config const& config) {
- if (config.hasTestFilters())
+ void IStreamingReporter::listTests(std::vector<TestCaseHandle> const& tests, IConfig const& config) {
+ if (config.hasTestFilters()) {
Catch::cout() << "Matching test cases:\n";
- else {
+ } else {
Catch::cout() << "All available test cases:\n";
}
@@ -167,7 +166,7 @@ namespace Catch {
}
}
- void IStreamingReporter::listTags(std::vector<TagInfo> const& tags, Config const& config) {
+ void IStreamingReporter::listTags(std::vector<TagInfo> const& tags, IConfig const& config) {
if (config.hasTestFilters()) {
Catch::cout() << "Tags for matching test cases:\n";
} else {