Anoncoin  0.9.4
P2P Digital Currency
test_main.cpp
Go to the documentation of this file.
1 // Many builder specific things set in the config file, ENABLE_WALLET is a good example. Don't forget to include it this way in your source files.
2 #if defined(HAVE_CONFIG_H)
4 #endif
5 
6 #ifdef ENABLE_WALLET
7 #include "paymentservertests.h"
8 #endif
9 #include "uritests.h"
10 
11 #include <QCoreApplication>
12 #include <QObject>
13 #include <QTest>
14 
15 #if defined(QT_STATICPLUGIN)
16 #include <QtPlugin>
17 #if QT_VERSION < 0x050000
18 Q_IMPORT_PLUGIN(qcncodecs)
19 Q_IMPORT_PLUGIN(qjpcodecs)
20 Q_IMPORT_PLUGIN(qtwcodecs)
21 Q_IMPORT_PLUGIN(qkrcodecs)
22 Q_IMPORT_PLUGIN(qtaccessiblewidgets)
23 #else
24 Q_IMPORT_PLUGIN(AccessibleFactory)
25 #if defined(QT_QPA_PLATFORM_XCB)
26 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
27 #elif defined(QT_QPA_PLATFORM_WINDOWS)
28 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
29 #elif defined(QT_QPA_PLATFORM_COCOA)
30 Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
31 #endif
32 #endif
33 #endif
34 
35 // This is all you need to run all the tests
36 int main(int argc, char *argv[])
37 {
38  bool fInvalid = false;
39 
40  // Don't remove this, it's needed to access
41  // QCoreApplication:: in the tests
42  QCoreApplication app(argc, argv);
43  app.setApplicationName("Anoncoin-test");
44 
45  URITests test1;
46  if (QTest::qExec(&test1) != 0)
47  fInvalid = true;
48 #ifdef ENABLE_WALLET
49  PaymentServerTests test2;
50  if (QTest::qExec(&test2) != 0)
51  fInvalid = true;
52 #endif
53 
54  return fInvalid;
55 }
int main(int argc, char *argv[])
Definition: test_main.cpp:36