Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
AppTests Class Reference

#include <apptests.h>

Inheritance diagram for AppTests:
[legend]
Collaboration diagram for AppTests:
[legend]

Classes

struct  HandleCallback
 RAII helper to remove no-longer-pending callback. More...
 

Public Member Functions

 AppTests (BitcoinApplication &app)
 

Private Slots

void appTests ()
 Entry point for BitcoinApplication tests. More...
 
void guiTests (BitcoinGUI *window)
 Entry point for BitcoinGUI tests. More...
 
void consoleTests (RPCConsole *console)
 Entry point for RPCConsole tests. More...
 

Private Member Functions

void expectCallback (std::string callback)
 Add expected callback name to list of pending callbacks. More...
 

Private Attributes

BitcoinApplicationm_app
 Bitcoin application. More...
 
std::multiset< std::string > m_callbacks
 Set of pending callback names. More...
 

Detailed Description

Definition at line 17 of file apptests.h.

Constructor & Destructor Documentation

◆ AppTests()

AppTests::AppTests ( BitcoinApplication app)
inlineexplicit

Definition at line 21 of file apptests.h.

Member Function Documentation

◆ appTests

void AppTests::appTests ( )
privateslot

Entry point for BitcoinApplication tests.

Definition at line 59 of file apptests.cpp.

Here is the call graph for this function:

◆ consoleTests

void AppTests::consoleTests ( RPCConsole console)
privateslot

Entry point for RPCConsole tests.

Definition at line 108 of file apptests.cpp.

Here is the caller graph for this function:

◆ expectCallback()

void AppTests::expectCallback ( std::string  callback)
inlineprivate

Add expected callback name to list of pending callbacks.

Definition at line 30 of file apptests.h.

Here is the caller graph for this function:

◆ guiTests

void AppTests::guiTests ( BitcoinGUI window)
privateslot

Entry point for BitcoinGUI tests.

Definition at line 98 of file apptests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_app

BitcoinApplication& AppTests::m_app
private

Bitcoin application.

Definition at line 41 of file apptests.h.

◆ m_callbacks

std::multiset<std::string> AppTests::m_callbacks
private

Set of pending callback names.

Used to track expected callbacks and shut down the app after the last callback has been handled and all tests have either run or thrown exceptions. This could be a simple int counter instead of a set of names, but the names might be useful for debugging.

Definition at line 47 of file apptests.h.


The documentation for this class was generated from the following files: