2014-12-17 02:47:57 +01:00
|
|
|
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
2014-09-05 13:11:11 +02:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2013-12-11 15:00:56 +01:00
|
|
|
#if defined(HAVE_CONFIG_H)
|
2014-06-23 20:04:24 +02:00
|
|
|
#include "config/bitcoin-config.h"
|
2013-12-11 15:00:56 +01:00
|
|
|
#endif
|
|
|
|
|
2014-09-05 13:11:11 +02:00
|
|
|
#include "uritests.h"
|
|
|
|
|
2013-12-11 15:00:56 +01:00
|
|
|
#ifdef ENABLE_WALLET
|
2013-07-22 08:50:39 +02:00
|
|
|
#include "paymentservertests.h"
|
2013-12-11 15:00:56 +01:00
|
|
|
#endif
|
2013-04-13 07:13:08 +02:00
|
|
|
|
2013-11-14 19:21:16 +01:00
|
|
|
#include <QCoreApplication>
|
2013-04-13 07:13:08 +02:00
|
|
|
#include <QObject>
|
|
|
|
#include <QTest>
|
2013-07-22 08:50:39 +02:00
|
|
|
|
2013-12-18 21:46:48 +01:00
|
|
|
#if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000
|
|
|
|
#include <QtPlugin>
|
|
|
|
Q_IMPORT_PLUGIN(qcncodecs)
|
|
|
|
Q_IMPORT_PLUGIN(qjpcodecs)
|
|
|
|
Q_IMPORT_PLUGIN(qtwcodecs)
|
|
|
|
Q_IMPORT_PLUGIN(qkrcodecs)
|
|
|
|
#endif
|
|
|
|
|
2013-07-22 08:50:39 +02:00
|
|
|
// This is all you need to run all the tests
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
bool fInvalid = false;
|
|
|
|
|
2013-11-14 19:21:16 +01:00
|
|
|
// Don't remove this, it's needed to access
|
|
|
|
// QCoreApplication:: in the tests
|
|
|
|
QCoreApplication app(argc, argv);
|
|
|
|
app.setApplicationName("Bitcoin-Qt-test");
|
|
|
|
|
2013-07-22 08:50:39 +02:00
|
|
|
URITests test1;
|
|
|
|
if (QTest::qExec(&test1) != 0)
|
|
|
|
fInvalid = true;
|
2013-12-11 15:00:56 +01:00
|
|
|
#ifdef ENABLE_WALLET
|
2013-07-22 08:50:39 +02:00
|
|
|
PaymentServerTests test2;
|
|
|
|
if (QTest::qExec(&test2) != 0)
|
|
|
|
fInvalid = true;
|
2013-12-11 15:00:56 +01:00
|
|
|
#endif
|
2013-07-22 08:50:39 +02:00
|
|
|
|
|
|
|
return fInvalid;
|
|
|
|
}
|