/* -*- 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"