SmtpClient-for-Qt/test/main.cpp
Vladimir Kolesnikov 4e2d1446dd Fix memory leak
2013-02-10 15:41:39 +02:00

27 lines
452 B
C++

#include <QCoreApplication>
#include <QtTest/QTest>
#include <QDebug>
#include "connectiontest.h"
bool success = true;
void runTest(QObject *test) {
int retVal = QTest::qExec(test);
delete test;
success &= retVal == 0;
}
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
runTest(new ConnectionTest());
if (success)
qDebug() << "SUCCESS";
else
qDebug() << "FAIL";
return success;
}