From 59d9b799fa5bf3c8ba99cc6f703b83751f1d3497 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 1 Sep 2017 04:05:51 +0300 Subject: Fix unit tests after last changes in configuration.cpp --- src/unittests/resources/dye/dye.cc | 11 ++++++++--- src/unittests/resources/dye/dyepalette.cc | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src/unittests/resources/dye') diff --git a/src/unittests/resources/dye/dye.cc b/src/unittests/resources/dye/dye.cc index 54ddd7c45..499e570ea 100644 --- a/src/unittests/resources/dye/dye.cc +++ b/src/unittests/resources/dye/dye.cc @@ -21,6 +21,8 @@ #include "unittests/unittests.h" #include "client.h" +#include "configmanager.h" +#include "configuration.h" #include "dirs.h" #include "graphicsmanager.h" @@ -28,7 +30,6 @@ #include "fs/virtfs/fs.h" -#include "gui/gui.h" #include "gui/userpalette.h" #include "gui/theme.h" @@ -1977,12 +1978,16 @@ TEST_CASE("Dye real dye", "") #endif // USE_SDL2 userPalette = new UserPalette; - theme = new Theme; - Theme::selectSkin(); Dirs::initRootDir(); Dirs::initHomeDir(); + setBrandingDefaults(branding); + ConfigManager::initConfiguration(); + + theme = new Theme; + Theme::selectSkin(); + ActorSprite::load(); SECTION("B dye") diff --git a/src/unittests/resources/dye/dyepalette.cc b/src/unittests/resources/dye/dyepalette.cc index 54d947358..7c49f02c1 100644 --- a/src/unittests/resources/dye/dyepalette.cc +++ b/src/unittests/resources/dye/dyepalette.cc @@ -77,9 +77,6 @@ TEST_CASE("DyePalette tests", "") graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 - theme = new Theme; - Theme::selectSkin(); - Dirs::initRootDir(); Dirs::initHomeDir(); @@ -87,6 +84,9 @@ TEST_CASE("DyePalette tests", "") setConfigDefaults2(config); setBrandingDefaults(branding); + theme = new Theme; + Theme::selectSkin(); + ActorSprite::load(); gui = new Gui(); gui->postInit(mainGraphics); -- cgit v1.2.3-60-g2f50