summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-05 17:00:02 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-05 17:00:02 +0300
commit855387d2d795c9471587cc7ddf2c66bb676d698e (patch)
tree3dbb1260c219312f36893dfae52f5cd40760aeb5 /src/gui/windowmanager_unittest.cc
parent9fefb2942865846ccb7dbdac4ebd4515b8c851a2 (diff)
downloadmanaverse-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.gz
manaverse-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.bz2
manaverse-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.xz
manaverse-855387d2d795c9471587cc7ddf2c66bb676d698e.zip
Fix different issues in unit tests.
Fix crash with some compilers flags. Clean window container to null after it was removed. Init and deinit physfs globally.
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r--src/gui/windowmanager_unittest.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 0f8c5bc15..048d23550 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -127,7 +127,6 @@ TEST_CASE("Windows tests", "windowmanager")
setEnv("SDL_VIDEODRIVER", "dummy");
client = new Client;
- PHYSFS_init("manaplus");
dirSeparator = "/";
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
@@ -138,6 +137,9 @@ TEST_CASE("Windows tests", "windowmanager")
resourceManager->cleanOrphans(true);
resourceManager->addToSearchPath("data", Append_false);
resourceManager->addToSearchPath("../data", Append_false);
+ resourceManager->addToSearchPath("data/test", Append_false);
+ resourceManager->addToSearchPath("../data/test", Append_false);
+ paths.setDefaultValues(getPathsDefaults());
branding.setValue("onlineServerFile", "test/serverlistplus.xml");
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper;
@@ -150,10 +152,11 @@ TEST_CASE("Windows tests", "windowmanager")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
- ActorSprite::load();
userPalette = new UserPalette;
- theme = new Theme;
config.setValue("fontSize", 16);
+ theme = new Theme;
+ Theme::selectSkin();
+ ActorSprite::load();
gui = new Gui();
gui->postInit(mainGraphics);
touchManager.init();