summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-20 15:51:27 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-20 15:51:27 +0300
commitcf772ab6f9fdfe1647b9b7b79aab685ebc831f31 (patch)
tree25cdb35a8733efe3a4cb90e36cbb89e8e0c24c10 /src/gui/windowmanager_unittest.cc
parent80ba4766d8ce9861f6d026e791abc741e3fed0f4 (diff)
downloadmanaverse-cf772ab6f9fdfe1647b9b7b79aab685ebc831f31.tar.gz
manaverse-cf772ab6f9fdfe1647b9b7b79aab685ebc831f31.tar.bz2
manaverse-cf772ab6f9fdfe1647b9b7b79aab685ebc831f31.tar.xz
manaverse-cf772ab6f9fdfe1647b9b7b79aab685ebc831f31.zip
Fix some leaks in unit tests.
Add support for suppression some leaks in asan.
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r--src/gui/windowmanager_unittest.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 392e6e872..68fc3852b 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -25,7 +25,7 @@
#include "settings.h"
#include "textcommand.h"
-#include "being/being.h"
+#include "being/localplayer.h"
#include "const/resources/currency.h"
@@ -159,6 +159,10 @@ TEST_CASE("Windows tests", "windowmanager")
config.setValue("fontSize", 16);
theme = new Theme;
Theme::selectSkin();
+
+ localPlayer = new LocalPlayer(static_cast<BeingId>(1),
+ BeingTypeId_zero);
+
ActorSprite::load();
gui = new Gui();
gui->postInit(mainGraphics);
@@ -568,6 +572,7 @@ TEST_CASE("Windows tests", "windowmanager")
gui->draw();
mainGraphics->updateScreen();
delete2(dialog);
+ delete2(textCommand);
}
SECTION("TextDialog")
@@ -677,9 +682,14 @@ TEST_CASE("Windows tests", "windowmanager")
delete2(connectionDialog);
}
+ delete2(localPlayer);
delete2(userPalette);
delete2(client);
delete2(serverFeatures);
delete2(inventoryHandler);
+ delete2(charServerHandler);
+ delete2(playerHandler);
+ delete2(logger);
+
// VirtFs::deinit();
}