summaryrefslogtreecommitdiff
path: root/client/test/testmultilist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/test/testmultilist.cc')
-rw-r--r--client/test/testmultilist.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/client/test/testmultilist.cc b/client/test/testmultilist.cc
new file mode 100644
index 0000000..65c14d7
--- /dev/null
+++ b/client/test/testmultilist.cc
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+#include <QtTest/QtTest>
+#include "util.h"
+#include "widgets/multilist.h"
+#include <QPixmap>
+#include <QIcon>
+
+static QString xml =
+ "<multilist name=\"foo\" value=\"bar\"/>";
+static QString xml2 =
+ "<multilist name=\"foo\" value=\"bar\" innerwidget=\"bar\">"
+ " <lineedit name=\"bar\" value=\"bleh\"/>"
+ "</multilist>";
+
+class TestMultiList: public QObject
+{
+Q_OBJECT
+private slots:
+ void memleak() {
+ QDomDocument doc; doc.setContent(xml2);
+ QDomElement e = doc.documentElement();
+ MacroWindow *w = createMacroWindow();
+
+ // FIXME: this is used to make sure all resources (icons and pixmaps)
+ // are loaded.
+ MultiList ml(e, w);
+
+ TEST_MEMLEAK(MultiList ml(e, w));
+
+ delete w;
+ }
+};
+
+QTEST_MAIN(TestMultiList)
+#include "testmultilist.moc"