From db2c855bf9d54fe512fa695ee6bf6c314331fe7c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Mar 2017 20:39:23 +0300 Subject: Add configuration path initialisation in tests where it need. --- src/resources/dye/dyepalette_unittest.cc | 9 +++++++++ src/resources/sprite/animatedsprite_unittest.cc | 10 ++++++++++ 2 files changed, 19 insertions(+) (limited to 'src/resources') diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc index ba25ea4ab..f475e7dab 100644 --- a/src/resources/dye/dyepalette_unittest.cc +++ b/src/resources/dye/dyepalette_unittest.cc @@ -22,6 +22,8 @@ #include "client.h" #include "configuration.h" +#include "configmanager.h" +#include "dirs.h" #include "graphicsmanager.h" #include "being/actorsprite.h" @@ -77,6 +79,13 @@ TEST_CASE("DyePalette tests") theme = new Theme; Theme::selectSkin(); + + Dirs::initRootDir(); + Dirs::initHomeDir(); + + ConfigManager::initConfiguration(); + getConfigDefaults2(config.getDefaultValues()); + ActorSprite::load(); gui = new Gui(); gui->postInit(mainGraphics); diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc index 0264fdbf6..2a05a40bf 100644 --- a/src/resources/sprite/animatedsprite_unittest.cc +++ b/src/resources/sprite/animatedsprite_unittest.cc @@ -21,7 +21,10 @@ #include "resources/sprite/animatedsprite.h" #include "catch.hpp" +#include "configuration.h" +#include "configmanager.h" #include "client.h" +#include "dirs.h" #include "graphicsmanager.h" #include "const/resources/spriteaction.h" @@ -76,6 +79,13 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") theme = new Theme; Theme::selectSkin(); + + Dirs::initRootDir(); + Dirs::initHomeDir(); + + ConfigManager::initConfiguration(); + getConfigDefaults2(config.getDefaultValues()); + ActorSprite::load(); gui = new Gui(); gui->postInit(mainGraphics); -- cgit v1.2.3-70-g09d2