summaryrefslogtreecommitdiff
path: root/src/unittests/resources/map/speciallayer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittests/resources/map/speciallayer.cc')
-rw-r--r--src/unittests/resources/map/speciallayer.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/unittests/resources/map/speciallayer.cc b/src/unittests/resources/map/speciallayer.cc
index 0461a98c4..c46c67626 100644
--- a/src/unittests/resources/map/speciallayer.cc
+++ b/src/unittests/resources/map/speciallayer.cc
@@ -21,12 +21,16 @@
#include "unittests/unittests.h"
#include "client.h"
+#include "dirs.h"
#include "logger.h"
#include "graphicsmanager.h"
#include "being/actorsprite.h"
+#include "gui/userpalette.h"
+#include "gui/theme.h"
+
#include "enums/resources/map/mapitemtype.h"
#include "fs/virtfs/fs.h"
@@ -72,6 +76,13 @@ TEST_CASE("SpecialLayer updateCache", "")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
+ userPalette = new UserPalette;
+ theme = new Theme;
+ Theme::selectSkin();
+
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
ActorSprite::load();
SpecialLayer *layer = nullptr;
@@ -275,6 +286,8 @@ TEST_CASE("SpecialLayer updateCache", "")
delete layer;
ResourceManager::cleanOrphans();
+ delete2(userPalette);
+ delete2(theme);
delete2(client);
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");