#define CATCH_CONFIG_RUNNER #include #include #include #if __has_include() #include #include #include #else #include #include #endif #include int main(int argc, char* argv[]) { Catch::Session session; Glib::init(); session.applyCommandLine(argc, argv); const auto logger = spdlog::default_logger(); #if CATCH_VERSION_MAJOR >= 3 for (const auto& spec : session.config().getReporterSpecs()) { const auto& reporter_name = spec.name(); #else { const auto& reporter_name = session.config().getReporterName(); #endif if (reporter_name == "tap") { spdlog::set_pattern("# [%l] %v"); } else if (reporter_name == "compact") { logger->sinks().clear(); } else { logger->sinks().assign({std::make_shared()}); } } return session.run(); }