1 // Copyright (c) 2009-2016 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.
5 #if defined(HAVE_CONFIG_H)
6 #include "config/bitcoin-config.h"
9 #include "chainparams.h"
10 #include "rpcnestedtests.h"
13 #include "compattests.h"
16 #include "paymentservertests.h"
17 #include "wallettests.h"
20 #include <QApplication>
24 #include <openssl/ssl.h>
26 #if defined(QT_STATICPLUGIN)
28 #if QT_VERSION < 0x050000
29 Q_IMPORT_PLUGIN(qcncodecs
)
30 Q_IMPORT_PLUGIN(qjpcodecs
)
31 Q_IMPORT_PLUGIN(qtwcodecs
)
32 Q_IMPORT_PLUGIN(qkrcodecs
)
34 #if defined(QT_QPA_PLATFORM_MINIMAL)
35 Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin
);
37 #if defined(QT_QPA_PLATFORM_XCB)
38 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin
);
39 #elif defined(QT_QPA_PLATFORM_WINDOWS)
40 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin
);
41 #elif defined(QT_QPA_PLATFORM_COCOA)
42 Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin
);
47 extern void noui_connect();
49 // This is all you need to run all the tests
50 int main(int argc
, char *argv
[])
54 SelectParams(CBaseChainParams::MAIN
);
57 bool fInvalid
= false;
59 // Prefer the "minimal" platform for the test instead of the normal default
60 // platform ("xcb", "windows", or "cocoa") so tests can't unintentially
61 // interfere with any background GUIs and don't require extra resources.
62 setenv("QT_QPA_PLATFORM", "minimal", 0);
64 // Don't remove this, it's needed to access
65 // QApplication:: and QCoreApplication:: in the tests
66 QApplication
app(argc
, argv
);
67 app
.setApplicationName("Bitcoin-Qt-test");
72 if (QTest::qExec(&test1
) != 0) {
76 PaymentServerTests test2
;
77 if (QTest::qExec(&test2
) != 0) {
82 if (QTest::qExec(&test3
) != 0) {
86 if (QTest::qExec(&test4
) != 0) {
91 if (QTest::qExec(&test5
) != 0) {