diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.pro | 10 | ||||
-rw-r--r-- | tests/tst_cursornavigation.cpp | 58 |
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" |