diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-01-11 02:01:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-11 16:42:29 +0300 |
commit | 7afa60701d62763159e9e4546f6f11430d5c3cb8 (patch) | |
tree | be841ccc853ed45eaedebf0f23db29fa178c76ab /src/resources/map/maplayer_unittest.cc | |
parent | 0dcedd986aa0eb8129df2b934a5fc4ebe35041d8 (diff) | |
download | manaplus-7afa60701d62763159e9e4546f6f11430d5c3cb8.tar.gz manaplus-7afa60701d62763159e9e4546f6f11430d5c3cb8.tar.bz2 manaplus-7afa60701d62763159e9e4546f6f11430d5c3cb8.tar.xz manaplus-7afa60701d62763159e9e4546f6f11430d5c3cb8.zip |
Fix maplayer issue detected by tests.
Diffstat (limited to 'src/resources/map/maplayer_unittest.cc')
-rw-r--r-- | src/resources/map/maplayer_unittest.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/map/maplayer_unittest.cc b/src/resources/map/maplayer_unittest.cc index 97a174cf5..014b2b71d 100644 --- a/src/resources/map/maplayer_unittest.cc +++ b/src/resources/map/maplayer_unittest.cc @@ -19,11 +19,16 @@ */ #include "catch.hpp" +#include "logger.h" #include "graphicsmanager.h" +#include "being/localplayer.h" + #include "enums/resources/map/blockmask.h" #include "enums/resources/map/mapitemtype.h" +#include "gui/theme.h" + #include "render/mockgraphics.h" #include "resources/sdlimagehelper.h" @@ -2339,6 +2344,7 @@ TEST_CASE("MapLayer drawFringe") ResourceManager::init(); resourceManager->addToSearchPath("data", Append_false); resourceManager->addToSearchPath("../data", Append_false); + logger = new Logger; imageHelper = new SDLImageHelper; #ifdef USE_SDL2 @@ -2350,6 +2356,12 @@ TEST_CASE("MapLayer drawFringe") graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 + theme = new Theme; + Theme::selectSkin(); + + localPlayer = new LocalPlayer(static_cast<BeingId>(1), + BeingTypeId_zero); + Image *const img1 = new Image(32, 32); Image *const img2 = new Image(32, 32); Image *const img3 = new Image(32, 32); |