mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 21:00:37 +02:00
Startingh UnitTesting
This commit is contained in:
57
src/UnitTest.pro
Normal file
57
src/UnitTest.pro
Normal 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
49
src/mainUnitTest.cpp
Normal 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"
|
||||||
Reference in New Issue
Block a user