mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge c2c6a7d1dc into merged_master (Bitcoin PR #803)
This commit is contained in:
commit
74c502779f
3 changed files with 43 additions and 21 deletions
|
|
@ -50,8 +50,8 @@ static const int TOOLTIP_WRAP_THRESHOLD = 80;
|
|||
/* Number of frames in spinner animation */
|
||||
#define SPINNER_FRAMES 36
|
||||
|
||||
#define QAPP_ORG_NAME "Bitcoin"
|
||||
#define QAPP_ORG_DOMAIN "bitcoin.org"
|
||||
#define QAPP_ORG_NAME "Elements"
|
||||
#define QAPP_ORG_DOMAIN "elementsproject.org"
|
||||
|
||||
#define QAPP_APP_NAME_DEFAULT "Elements-Qt"
|
||||
#define QAPP_APP_NAME_TESTNET "Elements-Qt-testnet"
|
||||
|
|
|
|||
|
|
@ -50,6 +50,17 @@ void OptionTests::migrateSettings()
|
|||
|
||||
settings.sync();
|
||||
|
||||
QVERIFY(settings.contains("nDatabaseCache"));
|
||||
QVERIFY(settings.contains("nThreadsScriptVerif"));
|
||||
QVERIFY(settings.contains("fUseUPnP"));
|
||||
QVERIFY(settings.contains("fListen"));
|
||||
QVERIFY(settings.contains("bPrune"));
|
||||
QVERIFY(settings.contains("nPruneSize"));
|
||||
QVERIFY(settings.contains("fUseProxy"));
|
||||
QVERIFY(settings.contains("addrProxy"));
|
||||
QVERIFY(settings.contains("fUseSeparateProxyTor"));
|
||||
QVERIFY(settings.contains("addrSeparateProxyTor"));
|
||||
|
||||
OptionsModel options{m_node};
|
||||
bilingual_str error;
|
||||
QVERIFY(options.Init(error));
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <interfaces/init.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <qt/bitcoin.h>
|
||||
#include <qt/guiconstants.h>
|
||||
#include <qt/test/apptests.h>
|
||||
#include <qt/test/optiontests.h>
|
||||
#include <qt/test/rpcnestedtests.h>
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QTest>
|
||||
|
||||
#include <functional>
|
||||
|
|
@ -83,36 +85,45 @@ int main(int argc, char* argv[])
|
|||
setenv("QT_QPA_PLATFORM", "minimal", 0 /* overwrite */);
|
||||
#endif
|
||||
|
||||
BitcoinApplication app;
|
||||
app.setApplicationName("Elements-Qt-test");
|
||||
app.createNode(*init);
|
||||
|
||||
QCoreApplication::setOrganizationName(QAPP_ORG_NAME);
|
||||
QCoreApplication::setApplicationName(QAPP_APP_NAME_DEFAULT "-test");
|
||||
|
||||
int num_test_failures{0};
|
||||
|
||||
AppTests app_tests(app);
|
||||
num_test_failures += QTest::qExec(&app_tests);
|
||||
{
|
||||
BitcoinApplication app;
|
||||
app.createNode(*init);
|
||||
|
||||
OptionTests options_tests(app.node());
|
||||
num_test_failures += QTest::qExec(&options_tests);
|
||||
AppTests app_tests(app);
|
||||
num_test_failures += QTest::qExec(&app_tests);
|
||||
|
||||
URITests test1;
|
||||
num_test_failures += QTest::qExec(&test1);
|
||||
OptionTests options_tests(app.node());
|
||||
num_test_failures += QTest::qExec(&options_tests);
|
||||
|
||||
RPCNestedTests test3(app.node());
|
||||
num_test_failures += QTest::qExec(&test3);
|
||||
URITests test1;
|
||||
num_test_failures += QTest::qExec(&test1);
|
||||
|
||||
RPCNestedTests test3(app.node());
|
||||
num_test_failures += QTest::qExec(&test3);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
WalletTests test5(app.node());
|
||||
num_test_failures += QTest::qExec(&test5);
|
||||
WalletTests test5(app.node());
|
||||
num_test_failures += QTest::qExec(&test5);
|
||||
|
||||
AddressBookTests test6(app.node());
|
||||
num_test_failures += QTest::qExec(&test6);
|
||||
AddressBookTests test6(app.node());
|
||||
num_test_failures += QTest::qExec(&test6);
|
||||
#endif
|
||||
|
||||
if (num_test_failures) {
|
||||
qWarning("\nFailed tests: %d\n", num_test_failures);
|
||||
} else {
|
||||
qDebug("\nAll tests passed.\n");
|
||||
if (num_test_failures) {
|
||||
qWarning("\nFailed tests: %d\n", num_test_failures);
|
||||
} else {
|
||||
qDebug("\nAll tests passed.\n");
|
||||
}
|
||||
}
|
||||
|
||||
QSettings settings;
|
||||
settings.clear();
|
||||
|
||||
return num_test_failures;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue