2012-09-22 17:59:27 +00:00
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QtTest/QTest>
|
|
|
|
#include <QDebug>
|
|
|
|
#include "connectiontest.h"
|
|
|
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
void runTest(QObject *test) {
|
|
|
|
int retVal = QTest::qExec(test);
|
2013-02-10 13:41:39 +00:00
|
|
|
delete test;
|
2012-09-22 17:59:27 +00:00
|
|
|
success &= retVal == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2013-02-10 13:40:10 +00:00
|
|
|
QCoreApplication a(argc, argv);
|
2012-09-22 17:59:27 +00:00
|
|
|
|
|
|
|
runTest(new ConnectionTest());
|
|
|
|
|
|
|
|
if (success)
|
|
|
|
qDebug() << "SUCCESS";
|
|
|
|
else
|
|
|
|
qDebug() << "FAIL";
|
|
|
|
|
|
|
|
return success;
|
|
|
|
}
|