]> Johnzone git - splittermond-assistant.git/commitdiff
restructure project to include tests
authorJohn Janus <j.janus@lighthouse-it.de>
Tue, 13 Aug 2019 13:53:01 +0000 (15:53 +0200)
committerJohn Janus <j.janus@lighthouse-it.de>
Tue, 13 Aug 2019 13:53:01 +0000 (15:53 +0200)
.gitignore
splittermond-assistant-tests/splittermond-assistant-tests.pro [new file with mode: 0644]
splittermond-assistant-tests/tst_test.cpp [new file with mode: 0644]
splittermond-assistant-top.pro [new file with mode: 0644]
splittermond-assistant/resources/views.qrc [moved from resources/views.qrc with 100% similarity]
splittermond-assistant/resources/views/main.qml [moved from resources/views/main.qml with 100% similarity]
splittermond-assistant/splittermond-assistant.pro [moved from splittermond-assistant.pro with 92% similarity]
splittermond-assistant/src/character.cpp [moved from src/character.cpp with 100% similarity]
splittermond-assistant/src/character.h [moved from src/character.h with 100% similarity]
splittermond-assistant/src/main.cpp [moved from src/main.cpp with 100% similarity]
splittermond-assistant/style.astylerc [moved from style.astylerc with 100% similarity]

index 495b778f70c7e4dc82dcd4a72f1be14b359d3ea2..a886c049d21295e673dbdcdbc09b96a2360fce2c 100644 (file)
@@ -34,8 +34,8 @@ Thumbs.db
 *.rc
 /.qmake.cache
 /.qmake.stash
-/build/
-/binaries/
+build/
+binaries/
 
 # qtcreator generated files
 *.pro.user*
diff --git a/splittermond-assistant-tests/splittermond-assistant-tests.pro b/splittermond-assistant-tests/splittermond-assistant-tests.pro
new file mode 100644 (file)
index 0000000..d2d7b7f
--- /dev/null
@@ -0,0 +1,9 @@
+QT += testlib
+QT -= gui
+
+CONFIG += qt console warn_on depend_includepath testcase
+CONFIG -= app_bundle
+
+TEMPLATE = app
+
+SOURCES +=  tst_test.cpp
diff --git a/splittermond-assistant-tests/tst_test.cpp b/splittermond-assistant-tests/tst_test.cpp
new file mode 100644 (file)
index 0000000..91bf4ed
--- /dev/null
@@ -0,0 +1,47 @@
+#include <QtTest>
+
+// add necessary includes here
+
+class Test : public QObject
+{
+  Q_OBJECT
+
+public:
+  Test();
+  ~Test();
+
+private slots:
+  void initTestCase();
+  void cleanupTestCase();
+  void test_case1();
+
+};
+
+Test::Test()
+{
+
+}
+
+Test::~Test()
+{
+
+}
+
+void Test::initTestCase()
+{
+
+}
+
+void Test::cleanupTestCase()
+{
+
+}
+
+void Test::test_case1()
+{
+
+}
+
+QTEST_APPLESS_MAIN(Test)
+
+#include "tst_test.moc"
diff --git a/splittermond-assistant-top.pro b/splittermond-assistant-top.pro
new file mode 100644 (file)
index 0000000..9ce9c2d
--- /dev/null
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS += splittermond-assistant \
+  splittermond-assistant-tests
similarity index 92%
rename from splittermond-assistant.pro
rename to splittermond-assistant/splittermond-assistant.pro
index 4dc6d797fd3f184f88abe7881091545737a9f282..29e46c7999789e0b78c2b560025273108bf75722 100644 (file)
@@ -1,5 +1,5 @@
-include(qmake-target-platform.pri)
-include(qmake-destination-path.pri)
+include(../qmake-target-platform.pri)
+include(../qmake-destination-path.pri)
 
 QT += qml quick xml
 CONFIG += c++17
@@ -41,7 +41,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
 DISTFILES += \
     style.astylerc
 
-DESTDIR = $$PWD/binaries/$$DESTINATION_PATH
+DESTDIR = $$PWD/../binaries/$$DESTINATION_PATH
 OBJECTS_DIR = $$PWD/build/$$DESTINATION_PATH/.obj
 MOC_DIR = $$PWD/build/$$DESTINATION_PATH/.moc
 RCC_DIR = $$PWD/build/$$DESTINATION_PATH/.qrc