diff options
Diffstat (limited to 'src/resources/map')
-rw-r--r-- | src/resources/map/maplayer_unittest.cc | 9 | ||||
-rw-r--r-- | src/resources/map/speciallayer_unittest.cc | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/resources/map/maplayer_unittest.cc b/src/resources/map/maplayer_unittest.cc index 75bd20219..5d7f5c258 100644 --- a/src/resources/map/maplayer_unittest.cc +++ b/src/resources/map/maplayer_unittest.cc @@ -28,6 +28,7 @@ #include "gui/theme.h" +#include "utils/delete2.h" #include "utils/virtfs.h" #include "render/mockgraphics.h" @@ -1646,6 +1647,7 @@ TEST_CASE("MapLayer draw") TEST_CASE("MapLayer drawSpecialLayer (specialLayer)") { + logger = new Logger; ResourceManager::init(); VirtFs::addDirToSearchPath("data", Append_false); VirtFs::addDirToSearchPath("../data", Append_false); @@ -1990,10 +1992,12 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)") delete map; delete mock; + delete2(logger); } TEST_CASE("MapLayer drawSpecialLayer (tempLayer)") { + logger = new Logger; ResourceManager::init(); VirtFs::addDirToSearchPath("data", Append_false); VirtFs::addDirToSearchPath("../data", Append_false); @@ -2344,14 +2348,15 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)") delete map; delete mock; + delete2(logger); } TEST_CASE("MapLayer drawFringe") { + logger = new Logger; ResourceManager::init(); VirtFs::addDirToSearchPath("data", Append_false); VirtFs::addDirToSearchPath("../data", Append_false); - logger = new Logger; imageHelper = new SDLImageHelper; #ifdef USE_SDL2 @@ -3220,9 +3225,11 @@ TEST_CASE("MapLayer drawFringe") REQUIRE(mock->mDraws[7].image == img1); } + delete2(localPlayer); delete map; delete img1; delete img2; delete img3; delete mock; + delete2(logger); } diff --git a/src/resources/map/speciallayer_unittest.cc b/src/resources/map/speciallayer_unittest.cc index 6c6772332..70f3d07e1 100644 --- a/src/resources/map/speciallayer_unittest.cc +++ b/src/resources/map/speciallayer_unittest.cc @@ -20,6 +20,7 @@ #include "catch.hpp" #include "client.h" +#include "logger.h" #include "graphicsmanager.h" @@ -40,6 +41,7 @@ TEST_CASE("SpecialLayer updateCache") { + logger = new Logger; client = new Client; ResourceManager::init(); VirtFs::addDirToSearchPath("data", Append_false); @@ -259,4 +261,5 @@ TEST_CASE("SpecialLayer updateCache") delete layer; resourceManager->cleanOrphans(); delete2(client); + delete2(logger); } |