From 57c5ca5b7fc3db3ab16d9a1cf2760d114e5685ca Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 17 Aug 2010 07:24:27 +0000 Subject: More tests --- client/test/testwindow.cc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 client/test/testwindow.cc (limited to 'client/test/testwindow.cc') diff --git a/client/test/testwindow.cc b/client/test/testwindow.cc new file mode 100644 index 0000000..72f5533 --- /dev/null +++ b/client/test/testwindow.cc @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +#include +#include "util.h" +#include "widgets/window.h" + +static QString xml = "\n"; +static QString xml2 = "\n" + "\n" + ""; + +class TestWindow: public QObject +{ +Q_OBJECT +private slots: + void memleak() { + QDomDocument doc; doc.setContent(xml); + QDomElement e = doc.documentElement(); + MacroWindow *w = createMacroWindow(); + TEST_MEMLEAK(Window le(e, w)); + delete w; + } + + void memleak2() { + QDomDocument doc; doc.setContent(xml2); + QDomElement e = doc.documentElement(); + MacroWindow *w = createMacroWindow(); + TEST_MEMLEAK(Window le(e, w)); + delete w; + } +}; + +QTEST_MAIN(TestWindow) +#include "testwindow.moc" -- cgit v1.2.3