Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
qt
test
apptests.h
Go to the documentation of this file.
1
// Copyright (c) 2018-present 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
5
#ifndef BITCOIN_QT_TEST_APPTESTS_H
6
#define BITCOIN_QT_TEST_APPTESTS_H
7
8
#include <QObject>
9
#include <set>
10
#include <string>
11
#include <utility>
12
13
class
BitcoinApplication
;
14
class
BitcoinGUI
;
15
class
RPCConsole
;
16
17
class
AppTests
:
public
QObject
18
{
19
Q_OBJECT
20
public
:
21
explicit
AppTests
(
BitcoinApplication
& app) :
m_app
(app) {}
22
23
private
Q_SLOTS:
24
void
appTests
();
25
void
guiTests
(
BitcoinGUI
* window);
26
void
consoleTests
(
RPCConsole
* console);
27
28
private
:
30
void
expectCallback
(std::string callback) {
m_callbacks
.emplace(std::move(callback)); }
31
33
struct
HandleCallback
34
{
35
std::string
m_callback
;
36
AppTests
&
m_app_tests
;
37
~HandleCallback
();
38
};
39
41
BitcoinApplication
&
m_app
;
42
47
std::multiset<std::string>
m_callbacks
;
48
};
49
50
#endif
// BITCOIN_QT_TEST_APPTESTS_H
AppTests::expectCallback
void expectCallback(std::string callback)
Add expected callback name to list of pending callbacks.
Definition
apptests.h:30
AppTests::AppTests
AppTests(BitcoinApplication &app)
Definition
apptests.h:21
AppTests::guiTests
void guiTests(BitcoinGUI *window)
Entry point for BitcoinGUI tests.
Definition
apptests.cpp:88
AppTests::m_app
BitcoinApplication & m_app
Bitcoin application.
Definition
apptests.h:41
AppTests::m_callbacks
std::multiset< std::string > m_callbacks
Definition
apptests.h:47
AppTests::appTests
void appTests()
Entry point for BitcoinApplication tests.
Definition
apptests.cpp:55
AppTests::consoleTests
void consoleTests(RPCConsole *console)
Entry point for RPCConsole tests.
Definition
apptests.cpp:98
BitcoinApplication
Main Bitcoin application object.
Definition
bitcoin.h:35
BitcoinGUI
Bitcoin GUI main class.
Definition
bitcoingui.h:68
RPCConsole
Local Bitcoin RPC console.
Definition
rpcconsole.h:44
AppTests::HandleCallback
RAII helper to remove no-longer-pending callback.
Definition
apptests.h:34
AppTests::HandleCallback::~HandleCallback
~HandleCallback()
Destructor to shut down after the last expected callback completes.
Definition
apptests.cpp:105
AppTests::HandleCallback::m_callback
std::string m_callback
Definition
apptests.h:35
AppTests::HandleCallback::m_app_tests
AppTests & m_app_tests
Definition
apptests.h:36
Generated on
for Bitcoin Core by
1.17.0