aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-cpp/tests
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-12-15 13:56:26 -0500
committerKen Moore <ken@ixsystems.com>2017-12-15 13:56:26 -0500
commit496a3cb583a2f5fb2da7c1808077c1fc5a9bfc28 (patch)
tree4a57b239aea12a98265a35580552f3fa45e48cfd /src-qt5/src-cpp/tests
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-496a3cb583a2f5fb2da7c1808077c1fc5a9bfc28.tar.gz
lumina-496a3cb583a2f5fb2da7c1808077c1fc5a9bfc28.tar.bz2
lumina-496a3cb583a2f5fb2da7c1808077c1fc5a9bfc28.zip
A bit more work on the networking side of the OSInterface.
Also add a test project for running tests against particular frameworks.
Diffstat (limited to 'src-qt5/src-cpp/tests')
-rw-r--r--src-qt5/src-cpp/tests/main.cpp38
-rw-r--r--src-qt5/src-cpp/tests/test.pro7
2 files changed, 45 insertions, 0 deletions
diff --git a/src-qt5/src-cpp/tests/main.cpp b/src-qt5/src-cpp/tests/main.cpp
new file mode 100644
index 00000000..682c318a
--- /dev/null
+++ b/src-qt5/src-cpp/tests/main.cpp
@@ -0,0 +1,38 @@
+#include <QDebug>
+#include <QApplication>
+
+#include <framework-OSInterface.h>
+
+/*
+class tester : public QObject{
+ Q_OBJECT
+public slots:
+ void finished(){ QApplication::exit(0); }
+
+public:
+ QTimer *timer;
+
+ tester(){
+ timer = new QTimer(this);
+ timer->setInterval(5000);
+ timer->setSingleShot(true);
+ connect(timer, SIGNAL(timeout()), this, SLOT(finished()) );
+ }
+
+};
+*/
+
+int main(int argc, char** argv){
+
+ QApplication A(argc,argv);
+ OSInterface OS;
+ OS.start();
+ QTimer *timer = new QTimer();
+ timer->setInterval(5000);
+ timer->setSingleShot(true);
+ QObject::connect(timer, SIGNAL(timeout()), &A, SLOT(quit()) );
+ timer->start();
+ int ret = A.exec();
+ qDebug() << " - Finished";
+ return ret;
+}
diff --git a/src-qt5/src-cpp/tests/test.pro b/src-qt5/src-cpp/tests/test.pro
new file mode 100644
index 00000000..425e7de6
--- /dev/null
+++ b/src-qt5/src-cpp/tests/test.pro
@@ -0,0 +1,7 @@
+QT = core gui widgets
+
+include(../framework-OSInterface.pri)
+
+TARGET = test
+
+SOURCES += main.cpp
bgstack15