// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #define BOOST_TEST_MODULE Bitcoin Test Suite #include #include #include #include #include std::unique_ptr g_connman; [[noreturn]] void Shutdown(void* parg) { std::exit(EXIT_SUCCESS); } [[noreturn]] void StartShutdown() { std::exit(EXIT_SUCCESS); } bool ShutdownRequested() { return false; } template void translate_exception(const T &e) { std::cerr << GetPrettyExceptionStr(std::current_exception()) << std::endl; throw; } template void register_exception_translator() { boost::unit_test::unit_test_monitor.register_exception_translator(&translate_exception); } struct ExceptionInitializer { ExceptionInitializer() { RegisterPrettyTerminateHander(); RegisterPrettySignalHandlers(); register_exception_translator(); register_exception_translator(); register_exception_translator(); } ~ExceptionInitializer() { } }; BOOST_GLOBAL_FIXTURE(ExceptionInitializer);