9e048495ba
(waitForReadyConnected, waitForAuthenticated, waitForMailSent) synchronous waiting. Added writeToDevice() function to MimeMessage and MimePart (and subclasses), now these are used in SmtpClient instead of toString(). Added some unit tests.
27 lines
461 B
C++
27 lines
461 B
C++
#include <QtGui/QApplication>
|
|
#include <QCoreApplication>
|
|
#include <QtTest/QTest>
|
|
#include <QDebug>
|
|
#include "connectiontest.h"
|
|
|
|
bool success = true;
|
|
|
|
void runTest(QObject *test) {
|
|
int retVal = QTest::qExec(test);
|
|
success &= retVal == 0;
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
runTest(new ConnectionTest());
|
|
|
|
if (success)
|
|
qDebug() << "SUCCESS";
|
|
else
|
|
qDebug() << "FAIL";
|
|
|
|
return success;
|
|
}
|