summaryrefslogtreecommitdiff
path: root/src/utils/chatutils_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/chatutils_unittest.cc')
-rw-r--r--src/utils/chatutils_unittest.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc
index a62cd57a4..7b3dd251e 100644
--- a/src/utils/chatutils_unittest.cc
+++ b/src/utils/chatutils_unittest.cc
@@ -20,6 +20,9 @@
#include "catch.hpp"
#include "client.h"
+#include "configuration.h"
+#include "configmanager.h"
+#include "dirs.h"
#include "actormanager.h"
#include "graphicsmanager.h"
@@ -61,8 +64,6 @@ TEST_CASE("chatutils replaceVars")
imageHelper = new SDLImageHelper();
mainGraphics = new SDLGraphics;
- gui = new Gui();
- gui->postInit(mainGraphics);
#ifdef USE_SDL2
SDLImageHelper::setRenderer(graphicsManager.createRenderer(
graphicsManager.createWindow(640, 480, 0,
@@ -72,6 +73,15 @@ TEST_CASE("chatutils replaceVars")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
+ ConfigManager::initConfiguration();
+ getConfigDefaults2(config.getDefaultValues());
+
+ gui = new Gui();
+ gui->postInit(mainGraphics);
+
ActorSprite::load();
localPlayer = new LocalPlayer(static_cast<BeingId>(1),
BeingTypeId_zero);