aboutsummaryrefslogtreecommitdiff
path: root/tests/client/modeltest.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-09-13 18:09:26 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-09-13 18:09:26 -0300
commit7dec723ad070fea717a8c235eeada0889615ab6a (patch)
treed15dcfaf383a22a5578ed6ecd5fea8b4b27abe66 /tests/client/modeltest.cpp
parenta03360ce3fa4b2de50917188a8a816992e864ba1 (diff)
downloadqmenumodel-7dec723ad070fea717a8c235eeada0889615ab6a.tar.gz
qmenumodel-7dec723ad070fea717a8c235eeada0889615ab6a.tar.bz2
qmenumodel-7dec723ad070fea717a8c235eeada0889615ab6a.zip
Appended comments on unit test.
Added 'valid' property in QStateAction.
Diffstat (limited to 'tests/client/modeltest.cpp')
-rw-r--r--tests/client/modeltest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index 347676e..ee3e0f4 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -56,16 +56,25 @@ private Q_SLOTS:
m_script.unpublishMenu();
}
+ /*
+ * Test if columnCount is always 1
+ */
void testColumnCount()
{
QCOMPARE(m_model.columnCount(), 1);
}
+ /*
+ * Test if parent function always return a empty QModelIndex
+ */
void testParent()
{
QCOMPARE(m_model.parent(QModelIndex()), QModelIndex());
}
+ /*
+ * Test if the propety busType handle correct integer values
+ */
void testBusTypeProperty()
{
m_model.setProperty("busType", 1);
@@ -82,6 +91,9 @@ private Q_SLOTS:
}
+ /*
+ * Test if model return the correct values for standard properties
+ */
void testData()
{
// Make menu available
@@ -127,6 +139,9 @@ private Q_SLOTS:
QCOMPARE(submenu->rowCount(), 2);
}
+ /*
+ * Test if the model parse correct GVariant values types
+ */
void testExtraData()
{
// Make menu available