aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2018-07-23 14:53:11 +0200
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:29:30 +0100
commitffd151ecf3971fd8601d8b1d4e2f04fb5793e364 (patch)
treecd3b947f04781d59bc61306dd34ef15f8c3a24fd /tests
Initial commit, demoable poc
Sort of working with 4 dir navigation, check demoapp
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.pro10
-rw-r--r--tests/tst_cursornavigation.cpp58
2 files changed, 68 insertions, 0 deletions
diff --git a/tests/tests.pro b/tests/tests.pro
new file mode 100644
index 0000000..2e9bc7e
--- /dev/null
+++ b/tests/tests.pro
@@ -0,0 +1,10 @@
+QT += testlib
+QT -= gui
+
+CONFIG += qt console warn_on depend_includepath testcase
+CONFIG -= app_bundle
+
+TEMPLATE = app
+
+SOURCES += \
+ tst_cursornavigation.cpp
diff --git a/tests/tst_cursornavigation.cpp b/tests/tst_cursornavigation.cpp
new file mode 100644
index 0000000..d61f635
--- /dev/null
+++ b/tests/tst_cursornavigation.cpp
@@ -0,0 +1,58 @@
+#include <QtTest>
+
+// add necessary includes here
+
+class TestCursorNavigation : public QObject
+{
+ Q_OBJECT
+
+public:
+ TestCursorNavigation();
+ ~TestCursorNavigation();
+
+private slots:
+ void test_pluginLoading();
+ void test_registering();
+ void test_withKeyNavigation();
+ void test_spatial4Directions();
+
+};
+
+TestCursorNavigation::TestCursorNavigation()
+{
+
+}
+
+TestCursorNavigation::~TestCursorNavigation()
+{
+
+}
+
+void TestCursorNavigation::test_pluginLoading()
+{
+ //test that the plugin loads and is available for use and a element with an attached property can be set
+}
+
+void TestCursorNavigation::test_registering()
+{
+ //see that elements marked for accepting cursor are added to the engines element register
+ //adding the property should add item to the register
+ //deleting the item should unregister the item
+ //unsetting the property should unregister the item
+}
+
+void TestCursorNavigation::test_withKeyNavigation()
+{
+ //test that element that additionally uses KeyNavigation, behaves primarily according to the KeyNavigation
+ //ie Cursor navigation plugin should not override KeyNavigation
+ //arrows + tab/backtab
+}
+
+void TestCursorNavigation::test_spatial4Directions()
+{
+ //test the spatial algorithm in the basic 4 directional case
+}
+
+QTEST_APPLESS_MAIN(TestCursorNavigation)
+
+#include "tst_cursornavigation.moc"