mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-28 12:07:32 -03:00
faec28252c
-BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
29 lines
765 B
C++
29 lines
765 B
C++
// Copyright (c) 2019 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_TEST_UTIL_LOGGING_H
|
|
#define BITCOIN_TEST_UTIL_LOGGING_H
|
|
|
|
#include <util/macros.h>
|
|
|
|
#include <functional>
|
|
#include <list>
|
|
#include <string>
|
|
|
|
class DebugLogHelper
|
|
{
|
|
const std::string m_message;
|
|
bool m_found{false};
|
|
std::list<std::function<void(const std::string&)>>::iterator m_print_connection;
|
|
|
|
void check_found();
|
|
|
|
public:
|
|
DebugLogHelper(std::string message);
|
|
~DebugLogHelper() { check_found(); }
|
|
};
|
|
|
|
#define ASSERT_DEBUG_LOG(message) DebugLogHelper PASTE2(debugloghelper, __COUNTER__)(message)
|
|
|
|
#endif // BITCOIN_TEST_UTIL_LOGGING_H
|