aboutsummaryrefslogtreecommitdiff
path: root/tests/client/modeltest.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-28 20:07:56 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-28 20:07:56 -0300
commit98ed17ed5c2ebab3a396906d4219af2e99988370 (patch)
tree526d7f52989723d623e426862393890c60b6cece /tests/client/modeltest.cpp
parent53dfc2a919fd03f5570cb106d71d3989a3f528d9 (diff)
parentda5a0437d57df35409fedb568b7ebf4e3d6af0da (diff)
downloadqmenumodel-98ed17ed5c2ebab3a396906d4219af2e99988370.tar.gz
qmenumodel-98ed17ed5c2ebab3a396906d4219af2e99988370.tar.bz2
qmenumodel-98ed17ed5c2ebab3a396906d4219af2e99988370.zip
Merged mainline.
Diffstat (limited to 'tests/client/modeltest.cpp')
-rw-r--r--tests/client/modeltest.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index c6b2f0e..8be92a6 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -25,6 +25,19 @@
#include <QtTest>
#include <QDebug>
+extern "C" {
+#include <gio/gio.h>
+}
+
+class TestMenuModel : public QMenuModel
+{
+public:
+ TestMenuModel(GMenuModel *other, QObject *parent=0)
+ : QMenuModel(other, parent)
+ {
+ }
+};
+
class ModelTest : public QObject
{
Q_OBJECT
@@ -218,6 +231,12 @@ private Q_SLOTS:
QCOMPARE(v.type(), QVariant::String);
QCOMPARE(v.toString(), QString("dança"));
+ // Tuple
+ v = extra["tuple"];
+ QVariantList lst;
+ lst << "1" << 2 << 3.3;
+ QCOMPARE(v.type(), QVariant::List);
+ QCOMPARE(v.toList(), lst);
}
/*
@@ -241,7 +260,6 @@ private Q_SLOTS:
delete model;
}
-
};
QTEST_MAIN(ModelTest)