Line data Source code
1 : // Copyright (c) 2009-2014 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 : #if defined(HAVE_CONFIG_H)
6 : #include "config/bitcoin-config.h"
7 : #endif
8 :
9 : #include "util.h"
10 : #include "uritests.h"
11 :
12 : #ifdef ENABLE_WALLET
13 : #include "paymentservertests.h"
14 : #endif
15 :
16 : #include <QCoreApplication>
17 : #include <QObject>
18 : #include <QTest>
19 :
20 : #include <openssl/ssl.h>
21 :
22 : #if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000
23 : #include <QtPlugin>
24 : Q_IMPORT_PLUGIN(qcncodecs)
25 : Q_IMPORT_PLUGIN(qjpcodecs)
26 : Q_IMPORT_PLUGIN(qtwcodecs)
27 : Q_IMPORT_PLUGIN(qkrcodecs)
28 : #endif
29 :
30 : // This is all you need to run all the tests
31 1 : int main(int argc, char *argv[])
32 : {
33 1 : SetupEnvironment();
34 1 : bool fInvalid = false;
35 :
36 : // Don't remove this, it's needed to access
37 : // QCoreApplication:: in the tests
38 1 : QCoreApplication app(argc, argv);
39 1 : app.setApplicationName("Bitcoin-Qt-test");
40 :
41 1 : SSL_library_init();
42 :
43 : URITests test1;
44 1 : if (QTest::qExec(&test1) != 0)
45 0 : fInvalid = true;
46 : #ifdef ENABLE_WALLET
47 : PaymentServerTests test2;
48 1 : if (QTest::qExec(&test2) != 0)
49 0 : fInvalid = true;
50 : #endif
51 :
52 2 : return fInvalid;
53 3 : }
|