summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-29 20:26:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-29 20:26:16 +0300
commit9ff7894ef1eeff001f3ddc1a1caec18176428fa1 (patch)
treed6c8dc8dc37d752ac046552ff5e8226fa73a9ed6 /src/gui/windowmanager_unittest.cc
parent7e0e97ee7ec31512731cbcef625a040266655062 (diff)
downloadplus-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.tar.gz
plus-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.tar.bz2
plus-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.tar.xz
plus-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.zip
Add some cleanup calls in unit tests.
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r--src/gui/windowmanager_unittest.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 37edeb1df..6ae3b0e34 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -133,10 +133,10 @@ TEST_CASE("Windows tests", "windowmanager")
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
logger = new Logger();
- delete ResourceManager::instance;
- ResourceManager::instance = nullptr;
+ delete resourceManager;
resourceManager = nullptr;
ResourceManager::init();
+ resourceManager->cleanOrphans(true);
resourceManager->addToSearchPath("data", Append_false);
resourceManager->addToSearchPath("../data", Append_false);
branding.setValue("onlineServerFile", "test/serverlistplus.xml");
@@ -228,17 +228,15 @@ TEST_CASE("Windows tests", "windowmanager")
}
SECTION("CharCreateDialog")
{
-/*
- LoginData data;
- CharSelectDialog *dialog2;
- CREATEWIDGETV(dialog2, CharSelectDialog, data);
- CharCreateDialog *dialog;
- CREATEWIDGETV(dialog, CharCreateDialog, dialog2, 0);
- gui->draw();
- mainGraphics->updateScreen();
- delete2(dialog);
- delete2(dialog2);
-*/
+// LoginData data;
+// CharSelectDialog *dialog2;
+// CREATEWIDGETV(dialog2, CharSelectDialog, data);
+// CharCreateDialog *dialog;
+// CREATEWIDGETV(dialog, CharCreateDialog, dialog2, 0);
+// gui->draw();
+// mainGraphics->updateScreen();
+// delete2(dialog);
+// delete2(dialog2);
}
SECTION("ChatWindow")
{
@@ -562,6 +560,7 @@ TEST_CASE("Windows tests", "windowmanager")
mainGraphics->updateScreen();
delete2(dialog);
}
+
SECTION("TextDialog")
{
TextDialog *dialog = CREATEWIDGETR(TextDialog,