summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMathias Hasselmann <mathias.hasselmann@kdab.com>2013-10-29 20:04:19 +0100
committerMathias Hasselmann <mathias.hasselmann@kdab.com>2013-10-29 20:04:19 +0100
commit2b291759186876e189de36d4404b40f7b696e013 (patch)
treeacd876d0c58afa4020abc745af7beadc330ad888 /tests
parent8dc7502ac0a86569945769d790ed79b4cd966079 (diff)
More work
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.pro4
-rw-r--r--tests/tst_qml/tst_qml.pro13
-rw-r--r--tests/tst_qml/tst_qmltest.cpp32
-rw-r--r--tests/tst_wrapping/tst_wrappingtest.cpp6
4 files changed, 48 insertions, 7 deletions
diff --git a/tests/tests.pro b/tests/tests.pro
index d9d63e7..075dbe5 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,4 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += \
- tst_wrapping
+ tst_qml
+
+# tst_wrapping \
diff --git a/tests/tst_qml/tst_qml.pro b/tests/tst_qml/tst_qml.pro
new file mode 100644
index 0000000..9b9c406
--- /dev/null
+++ b/tests/tst_qml/tst_qml.pro
@@ -0,0 +1,13 @@
+QT += qml testlib
+
+QT -= gui
+
+TARGET = tst_qmltest
+CONFIG += console
+CONFIG -= app_bundle
+
+TEMPLATE = app
+
+
+SOURCES += tst_qmltest.cpp
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/tst_qml/tst_qmltest.cpp b/tests/tst_qml/tst_qmltest.cpp
new file mode 100644
index 0000000..38e5411
--- /dev/null
+++ b/tests/tst_qml/tst_qmltest.cpp
@@ -0,0 +1,32 @@
+#include <QString>
+#include <QtTest>
+#include <QCoreApplication>
+#include <QtQml>
+
+class QmlTest : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testCase1()
+ {
+ QQmlEngine engine;
+ engine.addImportPath(qApp->applicationDirPath() + "/../../src");
+ qDebug() << (qApp->applicationDirPath() + "/../../src");
+
+ QStringListModel modelData;
+ QQmlContext *context = new QQmlContext(engine.rootContext());
+ context->setContextProperty("myModel", &modelData);
+
+ QQmlComponent component(&engine);
+ component.setData("import QtQuickStreamer 1.0\n"
+ "Pipeline { name: 'qmltest' }",
+ QUrl());
+ qDebug() << component.errors();
+ QObject *view = component.create(context);
+ }
+};
+
+QTEST_MAIN(QmlTest)
+
+#include "tst_qmltest.moc"
diff --git a/tests/tst_wrapping/tst_wrappingtest.cpp b/tests/tst_wrapping/tst_wrappingtest.cpp
index 4e0a2d2..2aca849 100644
--- a/tests/tst_wrapping/tst_wrappingtest.cpp
+++ b/tests/tst_wrapping/tst_wrappingtest.cpp
@@ -9,12 +9,6 @@ class WrappingTest : public QObject
{
Q_OBJECT
-public:
- WrappingTest()
- {
- gst_init(Q_NULLPTR, Q_NULLPTR);
- }
-
private slots:
void testCase1();