Startingh UnitTesting

This commit is contained in:
Jonas Mucke
2020-01-09 21:07:36 +01:00
parent 2ae679099b
commit 7eeee52fb4
2 changed files with 106 additions and 0 deletions

57
src/UnitTest.pro Normal file
View File

@@ -0,0 +1,57 @@
QT += testlib
QT += gui
CONFIG += qt warn_on depend_includepath testcase
TEMPLATE = app
SOURCES += \
GUI/IntelliPhotoGui.cpp \
Image/IntelliImage.cpp \
Image/IntelliRasterImage.cpp \
Image/IntelliShapedImage.cpp \
IntelliHelper/IntelliColorPicker.cpp \
IntelliHelper/IntelliRenderSettings.cpp \
IntelliHelper/IntelliToolsettings.cpp \
IntelliHelper/IntelliTriangulation.cpp \
Layer/PaintingArea.cpp \
Tool/IntelliColorPicker.cpp \
Tool/IntelliTool.cpp \
Tool/IntelliToolCircle.cpp \
Tool/IntelliToolFloodFill.cpp \
Tool/IntelliToolLine.cpp \
Tool/IntelliToolPen.cpp \
Tool/IntelliToolPlain.cpp \
Tool/IntelliToolPolygon.cpp \
Tool/IntelliToolRectangle.cpp \
mainUnitTest.cpp
DISTFILES += \
icons/Wechselpfeile.png \
icons/circle-tool.svg \
icons/eraser-tool.svg \
icons/flood-fill-tool.svg \
icons/icon.png \
icons/line-tool.svg \
icons/pen-tool.svg \
icons/plain-tool.svg \
icons/polygon-tool.svg \
icons/rectangle-tool.svg
HEADERS += \
GUI/IntelliPhotoGui.h \
Image/IntelliImage.h \
Image/IntelliRasterImage.h \
Image/IntelliShapedImage.h \
IntelliHelper/IntelliColorPicker.h \
IntelliHelper/IntelliRenderSettings.h \
IntelliHelper/IntelliToolsettings.h \
IntelliHelper/IntelliTriangulation.h \
Layer/PaintingArea.h \
Tool/IntelliTool.h \
Tool/IntelliToolCircle.h \
Tool/IntelliToolFloodFill.h \
Tool/IntelliToolLine.h \
Tool/IntelliToolPen.h \
Tool/IntelliToolPlain.h \
Tool/IntelliToolPolygon.h \
Tool/IntelliToolRectangle.h

49
src/mainUnitTest.cpp Normal file
View File

@@ -0,0 +1,49 @@
#include <QtTest>
// add necessary includes here
class UnitTest : public QObject
{
Q_OBJECT
public:
UnitTest();
~UnitTest();
private slots:
void initTestCase();
void cleanupTestCase();
void test_case1();
};
UnitTest::UnitTest()
{
}
UnitTest::~UnitTest()
{
}
void UnitTest::initTestCase()
{
}
void UnitTest::cleanupTestCase()
{
}
void UnitTest::test_case1()
{
QBENCHMARK {
QVERIFY(1 == 1);
}
}
QTEST_APPLESS_MAIN(UnitTest)
#include "tst_unittest.moc"