Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/apptests.cpp
Show All 19 Lines | |||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
#include <wallet/db.h> | #include <wallet/db.h> | ||||
#endif | #endif | ||||
#include <test/setup_common.h> | #include <test/setup_common.h> | ||||
#include <univalue.h> | |||||
#include <QAction> | #include <QAction> | ||||
#include <QEventLoop> | #include <QEventLoop> | ||||
#include <QLineEdit> | #include <QLineEdit> | ||||
#include <QScopedPointer> | #include <QScopedPointer> | ||||
#include <QTest> | #include <QTest> | ||||
#include <QTextEdit> | #include <QTextEdit> | ||||
#include <QtGlobal> | #include <QtGlobal> | ||||
/* | /* | ||||
* FIXME: <QtTest/QtTestGui> requires QT_WIDGETS_LIB to be defined prior | * FIXME: <QtTest/QtTestGui> requires QT_WIDGETS_LIB to be defined prior | ||||
* inclusion to export the QtTest::keyClicks symbol. | * inclusion to export the QtTest::keyClicks symbol. | ||||
* On some older Qt versions the definition end up being set by the inclusion of | * On some older Qt versions the definition end up being set by the inclusion of | ||||
* <QtTest/QtTestWidgets>. | * <QtTest/QtTestWidgets>. | ||||
* This only occurs when building with autotools, as QMake and CMake define | * This only occurs when building with autotools, as QMake and CMake define | ||||
* QT_WIDGETS_LIB on the command line. As a workaround for autotools, | * QT_WIDGETS_LIB on the command line. As a workaround for autotools, | ||||
* <QtTest/QtTestWidgets> should be included before <QtTest/QtTestGui>. | * <QtTest/QtTestWidgets> should be included before <QtTest/QtTestGui>. | ||||
* Also prevent the linter from sorting the includes. | * Also prevent the linter from sorting the includes. | ||||
*/ | */ | ||||
// clang-format off | // clang-format off | ||||
#include <QtTest/QtTestWidgets> | #include <QtTest/QtTestWidgets> | ||||
#include <QtTest/QtTestGui> | #include <QtTest/QtTestGui> | ||||
// clang-format on | // clang-format on | ||||
#include <univalue.h> | |||||
#include <string> | #include <string> | ||||
namespace { | namespace { | ||||
//! Call getblockchaininfo RPC and check first field of JSON output. | //! Call getblockchaininfo RPC and check first field of JSON output. | ||||
void TestRpcCommand(RPCConsole *console) { | void TestRpcCommand(RPCConsole *console) { | ||||
QEventLoop loop; | QEventLoop loop; | ||||
QTextEdit *messagesWidget = | QTextEdit *messagesWidget = | ||||
console->findChild<QTextEdit *>("messagesWidget"); | console->findChild<QTextEdit *>("messagesWidget"); | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |