-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (27 loc) · 776 Bytes
/
main.cpp
File metadata and controls
33 lines (27 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "qqrencodetestsuite.h"
#include "testrunner.h"
#include <QCoreApplication>
#include <QtTest>
#include <QTimer>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
QTextCodec::setCodecForCStrings(codec);
#endif
// Perform tests
TestRunner runner(QStringList(), &app);
/**
* Add tests here
*/
runner.addTest(new QQREncodeTestSuite(&app));
QObject::connect(&runner, &TestRunner::finished, [&] (int result)
{
qDebug() << "Overall Result: " << (result == 0 ? "PASS" : "FAIL");
app.quit();
});
QTimer::singleShot(0, &runner, SLOT(run()));
return app.exec();
}