test: Replace DEBUG_LOG_OUT with -printtoconsole=1

This commit is contained in:
Hodlinator
2026-03-26 14:41:57 +01:00
parent 99f99c989e
commit 261d229455
7 changed files with 1 additions and 23 deletions

View File

@@ -14,18 +14,6 @@
#include <functional>
#include <iostream>
/** Redirect debug log to unit_test.log files */
const std::function<void(const std::string&)> G_TEST_LOG_FUN = [](const std::string& s) {
static const bool should_log{std::any_of(
&boost::unit_test::framework::master_test_suite().argv[1],
&boost::unit_test::framework::master_test_suite().argv[boost::unit_test::framework::master_test_suite().argc],
[](const char* arg) {
return std::string{"DEBUG_LOG_OUT"} == arg;
})};
if (!should_log) return;
std::cout << s;
};
/**
* Retrieve the command line arguments from boost.
* Allows usage like: