Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/apptests.cpp
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | #endif | ||||
m_app.requestInitialize(config, rpcServer, httpRPCRequestProcessor); | m_app.requestInitialize(config, rpcServer, httpRPCRequestProcessor); | ||||
m_app.exec(); | m_app.exec(); | ||||
m_app.requestShutdown(config); | m_app.requestShutdown(config); | ||||
m_app.exec(); | m_app.exec(); | ||||
// Reset global state to avoid interfering with later tests. | // Reset global state to avoid interfering with later tests. | ||||
LogInstance().DisconnectTestLogger(); | LogInstance().DisconnectTestLogger(); | ||||
AbortShutdown(); | AbortShutdown(); | ||||
UnloadBlockIndex(); | UnloadBlockIndex(/* mempool */ nullptr); | ||||
WITH_LOCK(::cs_main, g_chainman.Reset()); | WITH_LOCK(::cs_main, g_chainman.Reset()); | ||||
} | } | ||||
//! Entry point for BitcoinGUI tests. | //! Entry point for BitcoinGUI tests. | ||||
void AppTests::guiTests(BitcoinGUI *window) { | void AppTests::guiTests(BitcoinGUI *window) { | ||||
HandleCallback callback{"guiTests", *this}; | HandleCallback callback{"guiTests", *this}; | ||||
connect(window, &BitcoinGUI::consoleShown, this, &AppTests::consoleTests); | connect(window, &BitcoinGUI::consoleShown, this, &AppTests::consoleTests); | ||||
expectCallback("consoleTests"); | expectCallback("consoleTests"); | ||||
Show All 20 Lines |