GUITEST: Add first GUI test testing TranslationHandler.
This commit is contained in:
parent
83f43d8ab6
commit
2684b230f1
|
@ -0,0 +1,10 @@
|
||||||
|
TEMPLATE = app
|
||||||
|
TARGET =
|
||||||
|
CONFIG += qtestlib
|
||||||
|
DEPENDPATH += . ..
|
||||||
|
INCLUDEPATH += . ..
|
||||||
|
|
||||||
|
SOURCES += testtranslationhandler.cpp
|
||||||
|
|
||||||
|
HEADERS += ../translationhandler.h
|
||||||
|
SOURCES += ../translationhandler.cpp
|
|
@ -0,0 +1,21 @@
|
||||||
|
#include <QtTest>
|
||||||
|
#include <QObject>
|
||||||
|
#include "translationhandler.h"
|
||||||
|
|
||||||
|
class TestTranslationHandler: public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void construct();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TestTranslationHandler::construct()
|
||||||
|
{
|
||||||
|
TranslationHandler handler;
|
||||||
|
QCOMPARE(10, handler.GetNames().size());
|
||||||
|
QCOMPARE(QString("en"), handler.GetCurrentLanguage());
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "testtranslationhandler.moc"
|
||||||
|
QTEST_MAIN(TestTranslationHandler)
|
|
@ -63,7 +63,7 @@ class TranslationHandler : QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
TranslationHandler(QObject *parent);
|
TranslationHandler(QObject *parent = 0);
|
||||||
virtual ~TranslationHandler();
|
virtual ~TranslationHandler();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,6 +7,8 @@ astyle $style $options cli/*.cpp
|
||||||
astyle $style $options cli/*.h
|
astyle $style $options cli/*.h
|
||||||
astyle $style $options gui/*.cpp
|
astyle $style $options gui/*.cpp
|
||||||
astyle $style $options gui/*.h
|
astyle $style $options gui/*.h
|
||||||
|
astyle $style $options gui/test/*.cpp
|
||||||
|
astyle $style $options gui/test/*.h
|
||||||
astyle $style $options lib/*.cpp
|
astyle $style $options lib/*.cpp
|
||||||
astyle $style $options lib/*.h
|
astyle $style $options lib/*.h
|
||||||
astyle $style $options test/*.cpp
|
astyle $style $options test/*.cpp
|
||||||
|
|
|
@ -7,6 +7,8 @@ astyle %STYLE% %OPTIONS% cli/*.cpp
|
||||||
astyle %STYLE% %OPTIONS% cli/*.h
|
astyle %STYLE% %OPTIONS% cli/*.h
|
||||||
astyle %STYLE% %OPTIONS% gui/*.cpp
|
astyle %STYLE% %OPTIONS% gui/*.cpp
|
||||||
astyle %STYLE% %OPTIONS% gui/*.h
|
astyle %STYLE% %OPTIONS% gui/*.h
|
||||||
|
astyle %STYLE% %OPTIONS% gui/test/*.cpp
|
||||||
|
astyle %STYLE% %OPTIONS% gui/test/*.h
|
||||||
astyle %STYLE% %OPTIONS% lib/*.cpp
|
astyle %STYLE% %OPTIONS% lib/*.cpp
|
||||||
astyle %STYLE% %OPTIONS% lib/*.h
|
astyle %STYLE% %OPTIONS% lib/*.h
|
||||||
astyle %STYLE% %OPTIONS% test/*.cpp
|
astyle %STYLE% %OPTIONS% test/*.cpp
|
||||||
|
|
Loading…
Reference in New Issue