summaryrefslogtreecommitdiff
path: root/src/unittests/resources/dye/dyepalette.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-14 02:52:41 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-14 02:52:41 +0300
commit4133ef1e7821cae6205d4ee5a8e3277eec9fe540 (patch)
tree3666e5d95da67dbe7ef739b41f78170885be97d4 /src/unittests/resources/dye/dyepalette.cc
parentbb980aaf7a61f8d0fe03f7def03795d5f5d8d2a0 (diff)
downloadmanaplus-4133ef1e7821cae6205d4ee5a8e3277eec9fe540.tar.gz
manaplus-4133ef1e7821cae6205d4ee5a8e3277eec9fe540.tar.bz2
manaplus-4133ef1e7821cae6205d4ee5a8e3277eec9fe540.tar.xz
manaplus-4133ef1e7821cae6205d4ee5a8e3277eec9fe540.zip
Fix unit tests error with undefined config variable.
Diffstat (limited to 'src/unittests/resources/dye/dyepalette.cc')
-rw-r--r--src/unittests/resources/dye/dyepalette.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/unittests/resources/dye/dyepalette.cc b/src/unittests/resources/dye/dyepalette.cc
index 47f7266a4..e2632003a 100644
--- a/src/unittests/resources/dye/dyepalette.cc
+++ b/src/unittests/resources/dye/dyepalette.cc
@@ -67,6 +67,14 @@ TEST_CASE("DyePalette tests", "")
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
+
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
+ ConfigManager::initConfiguration();
+ setConfigDefaults2(config);
+ setBrandingDefaults(branding);
+
#ifdef USE_SDL2
SDLImageHelper::setRenderer(graphicsManager.createRenderer(
graphicsManager.createWindow(640, 480, 0,
@@ -76,13 +84,6 @@ TEST_CASE("DyePalette tests", "")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
- Dirs::initRootDir();
- Dirs::initHomeDir();
-
- ConfigManager::initConfiguration();
- setConfigDefaults2(config);
- setBrandingDefaults(branding);
-
theme = new Theme;
Theme::selectSkin();