Fix build with catch2>=3.0.0
parent
5da45ece9d
commit
1db3c55b48
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <glibmm.h>
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <thread>
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "config.hpp"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
TEST_CASE("Load simple config", "[config]") {
|
||||
waybar::Config conf;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <spdlog/sinks/stdout_sinks.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_reporter_tap.hpp>
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <catch2/reporters/catch_reporter_tap.hpp>
|
||||
#include <memory>
|
||||
|
||||
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<spdlog::sinks::stderr_sink_st>()});
|
||||
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<spdlog::sinks::stderr_sink_st>()});
|
||||
}
|
||||
}
|
||||
|
||||
return session.run();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <date/date.h>
|
||||
#include <date/tz.h>
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <chrono>
|
||||
#include <stdexcept>
|
||||
|
||||
|
|
Loading…
Reference in New Issue