Bitcoin Core 22.99.0
P2P Digital Currency
main.cpp
Go to the documentation of this file.
1// Copyright (c) 2011-2020 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
8#define BOOST_TEST_MODULE Bitcoin Core Test Suite
9
10#include <boost/test/unit_test.hpp>
11
13
14#include <iostream>
15
17const std::function<void(const std::string&)> G_TEST_LOG_FUN = [](const std::string& s) {
18 static const bool should_log{std::any_of(
19 &boost::unit_test::framework::master_test_suite().argv[1],
20 &boost::unit_test::framework::master_test_suite().argv[boost::unit_test::framework::master_test_suite().argc],
21 [](const char* arg) {
22 return std::string{"DEBUG_LOG_OUT"} == arg;
23 })};
24 if (!should_log) return;
25 std::cout << s;
26};
const std::function< void(const std::string &)> G_TEST_LOG_FUN
Redirect debug log to unit_test.log files.
Definition: main.cpp:17