summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2016-12-13 02:35:16 +0100
committerAnne Jan Brouwer <brouwer@annejan.com>2016-12-13 02:35:16 +0100
commitdab5890f0faeac70eaef404394f51cffc30afc78 (patch)
tree1d84d4666e5a3477e337e3a2c32555b486d8f7f3 /tests
parent3ebd54e2b30ebeba69929c22a88655eb72bf64b0 (diff)
LOL wut, also how do I link ..
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pri3
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/util/tst_util.cpp38
-rw-r--r--tests/auto/util/util.pro3
-rw-r--r--tests/tests.pri10
-rw-r--r--tests/tests.pro5
6 files changed, 61 insertions, 0 deletions
diff --git a/tests/auto/auto.pri b/tests/auto/auto.pri
new file mode 100644
index 00000000..e391d44f
--- /dev/null
+++ b/tests/auto/auto.pri
@@ -0,0 +1,3 @@
+!include(../tests.pri) { error("Couldn't find the tests.pri file!") }
+
+!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
new file mode 100644
index 00000000..66e5fab2
--- /dev/null
+++ b/tests/auto/auto.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS += util
diff --git a/tests/auto/util/tst_util.cpp b/tests/auto/util/tst_util.cpp
new file mode 100644
index 00000000..f4829517
--- /dev/null
+++ b/tests/auto/util/tst_util.cpp
@@ -0,0 +1,38 @@
+#include "../../../src/util.h"
+#include <QtTest/QtTest>
+
+class tst_util : public QObject {
+ Q_OBJECT
+
+public:
+ tst_util();
+ ~tst_util();
+
+public Q_SLOTS:
+ void init();
+ void cleanup();
+
+private Q_SLOTS:
+ void initTestCase();
+ void cleanupTestCase();
+ void normalizeFolderPath();
+};
+
+tst_util::tst_util() {}
+
+tst_util::~tst_util() {}
+
+void tst_util::init() {}
+
+void tst_util::cleanup() {}
+
+void tst_util::initTestCase() {}
+
+void tst_util::cleanupTestCase() {}
+
+void tst_util::normalizeFolderPath() {
+ // QCOMPARE(Util::normalizeFolderPath("test"), "test/");
+}
+
+QTEST_MAIN(tst_util)
+#include "tst_util.moc"
diff --git a/tests/auto/util/util.pro b/tests/auto/util/util.pro
new file mode 100644
index 00000000..d9f4ef02
--- /dev/null
+++ b/tests/auto/util/util.pro
@@ -0,0 +1,3 @@
+!include(../auto.pri) { error("Couldn't find the auto.pri file!") }
+
+SOURCES += tst_util.cpp
diff --git a/tests/tests.pri b/tests/tests.pri
new file mode 100644
index 00000000..248c55e8
--- /dev/null
+++ b/tests/tests.pri
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+CONFIG += testcase qt warn_on depend_includepath testcase
+QT += testlib widgets
+
+target.path = $$[QT_INSTALL_TESTS]/qtpass/$$TARGET
+INSTALLS += target
+
+VPATH += ../src
+INCLUDEPATH += ../src
diff --git a/tests/tests.pro b/tests/tests.pro
new file mode 100644
index 00000000..65126941
--- /dev/null
+++ b/tests/tests.pro
@@ -0,0 +1,5 @@
+QT += widgets testlib
+CONFIG += no_docs_target
+TEMPLATE = subdirs
+SUBDIRS += auto
+exists(manual): SUBDIRS += manual