Commit 1507ef16 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Generate autotests, which do not require a graphical display, as command line app

CCBUG:428784
parent 42296b9c
......@@ -18,11 +18,11 @@
***************************************************************************/
#include "alkcompanytest.h"
#include "alkcompany.h"
#include <QtTest/QtTest>
#include "alkcompany.h"
#include "test.h"
QTEST_MAIN(AlkCompanyTest)
QTEST_GUILESS_MAIN(AlkCompanyTest)
void AlkCompanyTest::init()
{
......
......@@ -19,11 +19,11 @@
***************************************************************************/
#include "alkdateformattest.h"
#include "alkdateformat.h"
#include <QtTest/QtTest>
#include "alkdateformat.h"
#include "test.h"
QTEST_MAIN(AlkDateFormatTest)
QTEST_GUILESS_MAIN(AlkDateFormatTest)
void AlkDateFormatTest::testDateFormatKMyMoney()
{
......
......@@ -19,9 +19,9 @@
#include "alkexceptiontest.h"
#include <QtTest/QtTest>
#include "test.h"
QTEST_MAIN(AlkExceptionTest)
QTEST_GUILESS_MAIN(AlkExceptionTest)
void AlkExceptionTest::init()
{
......
......@@ -20,10 +20,9 @@
#include "alkonlinequotesourcetest.h"
#include "alkonlinequotesource.h"
#include "test.h"
#include <QtTest/QtTest>
QTEST_MAIN(AlkOnlineQuoteSourceTest)
QTEST_GUILESS_MAIN(AlkOnlineQuoteSourceTest)
void AlkOnlineQuoteSourceTest::init()
{
......
......@@ -18,11 +18,11 @@
***************************************************************************/
#include "alkquoteitemtest.h"
#include "alkquoteitem.h"
#include <QtTest/QtTest>
#include "alkquoteitem.h"
#include "test.h"
QTEST_MAIN(AlkQuoteItemTest)
QTEST_GUILESS_MAIN(AlkQuoteItemTest)
void AlkQuoteItemTest::init()
{
......
......@@ -20,10 +20,9 @@
#include "alkvaluetest.h"
#include "alkimia/alkvalue.h"
#include "test.h"
#include <QtTest/QtTest>
QTEST_MAIN(AlkValueTest)
QTEST_GUILESS_MAIN(AlkValueTest)
namespace QTest {
template<>
......
#ifndef TEST_H
#define TEST_H
#include <QtTest/QtTest>
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
#define QTEST_GUILESS_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
QCoreApplication app(argc, argv); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
#endif
#endif // TEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment