From 1db3c55b488fbc4f2936fd6e4656b70aa53c42f5 Mon Sep 17 00:00:00 2001 From: llyyr Date: Sun, 16 Oct 2022 19:21:43 +0530 Subject: [PATCH] Fix build with catch2>=3.0.0 --- test/SafeSignal.cpp | 2 +- test/config.cpp | 2 +- test/main.cpp | 19 ++++++++++--------- test/waybar_time.cpp | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/test/SafeSignal.cpp b/test/SafeSignal.cpp index 6a1e17a..7ff6f2a 100644 --- a/test/SafeSignal.cpp +++ b/test/SafeSignal.cpp @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/test/config.cpp b/test/config.cpp index 29b0502..cdc96b0 100644 --- a/test/config.cpp +++ b/test/config.cpp @@ -1,6 +1,6 @@ #include "config.hpp" -#include +#include TEST_CASE("Load simple config", "[config]") { waybar::Config conf; diff --git a/test/main.cpp b/test/main.cpp index 5eb060d..7970c26 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include int main(int argc, char* argv[]) { @@ -13,13 +13,14 @@ int main(int argc, char* argv[]) { session.applyCommandLine(argc, argv); const auto logger = spdlog::default_logger(); - const auto& reporter_name = session.config().getReporterName(); - if (reporter_name == "tap") { - spdlog::set_pattern("# [%l] %v"); - } else if (reporter_name == "compact") { - logger->sinks().clear(); - } else { - logger->sinks().assign({std::make_shared()}); + for (const auto& spec : session.config().getReporterSpecs()) { + if (spec.name() == "tap") { + spdlog::set_pattern("# [%l] %v"); + } else if (spec.name() == "compact") { + logger->sinks().clear(); + } else { + logger->sinks().assign({std::make_shared()}); + } } return session.run(); diff --git a/test/waybar_time.cpp b/test/waybar_time.cpp index 5fc3312..79469d4 100644 --- a/test/waybar_time.cpp +++ b/test/waybar_time.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include