summaryrefslogtreecommitdiff
path: root/src/unittests/integrity_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittests/integrity_unittest.cc')
-rw-r--r--src/unittests/integrity_unittest.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/unittests/integrity_unittest.cc b/src/unittests/integrity_unittest.cc
index b2c234109..37abf43ae 100644
--- a/src/unittests/integrity_unittest.cc
+++ b/src/unittests/integrity_unittest.cc
@@ -20,7 +20,9 @@
#include "unittests/unittests.h"
+#include "configuration.h"
#include "client.h"
+#include "dirs.h"
#include "logger.h"
#include "graphicsmanager.h"
@@ -32,6 +34,8 @@
#include "fs/virtfs/rwops.h"
#include "gui/gui.h"
+#include "gui/userpalette.h"
+#include "gui/theme.h"
#include "input/inputactionmap.h"
@@ -142,6 +146,14 @@ TEST_CASE("integrity tests", "integrity")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
+ userPalette = new UserPalette;
+ config.setValue("fontSize", 16);
+ theme = new Theme;
+ Theme::selectSkin();
+
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
ActorSprite::load();
const char *const name1 = "dir/hide.png";
const int size1 = 368;
@@ -347,11 +359,12 @@ TEST_CASE("integrity tests", "integrity")
ResourceManager::cleanOrphans(true);
- delete client;
- client = nullptr;
+ delete2(userPalette);
+ delete2(client);
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
+
delete2(logger);
// VirtFs::deinit();
}