summaryrefslogtreecommitdiff
path: root/src/unittests/resources/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-12 18:47:07 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-12 18:47:07 +0300
commitd88285ef4d2b624a0c6a8ef5c2e157ed0248838e (patch)
tree21c77124f72c023590f0d1b0426eb9357305201e /src/unittests/resources/map
parent429a545dbd5d0fa992394cf7f4c83d5e972a14b2 (diff)
downloadplus-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.tar.gz
plus-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.tar.bz2
plus-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.tar.xz
plus-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.zip
Create logger in unit tests before other code.
This need because now sdl may raise error or assert almost at start.
Diffstat (limited to 'src/unittests/resources/map')
-rw-r--r--src/unittests/resources/map/maplayer/draw.cc2
-rw-r--r--src/unittests/resources/map/maplayer/drawfringenormal.cc2
-rw-r--r--src/unittests/resources/map/maplayer/drawfringesimple.cc2
-rw-r--r--src/unittests/resources/map/maplayer/drawspeciallayer1.cc3
-rw-r--r--src/unittests/resources/map/maplayer/drawspeciallayer2.cc3
-rw-r--r--src/unittests/resources/map/maplayer/getemptytiledrawwidth.cc6
-rw-r--r--src/unittests/resources/map/maplayer/gettiledrawwidth.cc6
-rw-r--r--src/unittests/resources/map/maplayer/updatecache.cc6
-rw-r--r--src/unittests/resources/map/maplayer/updateconditiontiles.cc6
-rw-r--r--src/unittests/resources/map/speciallayer.cc2
10 files changed, 0 insertions, 38 deletions
diff --git a/src/unittests/resources/map/maplayer/draw.cc b/src/unittests/resources/map/maplayer/draw.cc
index 5e6cfdddf..9b946b0c9 100644
--- a/src/unittests/resources/map/maplayer/draw.cc
+++ b/src/unittests/resources/map/maplayer/draw.cc
@@ -34,8 +34,6 @@
TEST_CASE("MapLayer draw", "")
{
- logger = new Logger;
-
Dirs::initRootDir();
Dirs::initHomeDir();
diff --git a/src/unittests/resources/map/maplayer/drawfringenormal.cc b/src/unittests/resources/map/maplayer/drawfringenormal.cc
index 4ec72484b..15990d5f6 100644
--- a/src/unittests/resources/map/maplayer/drawfringenormal.cc
+++ b/src/unittests/resources/map/maplayer/drawfringenormal.cc
@@ -54,7 +54,6 @@ TEST_CASE("MapLayer drawFringe normal", "")
{
setEnv("SDL_VIDEODRIVER", "dummy");
- logger = new Logger;
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -526,5 +525,4 @@ TEST_CASE("MapLayer drawFringe normal", "")
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/drawfringesimple.cc b/src/unittests/resources/map/maplayer/drawfringesimple.cc
index 8c3457e8f..e910a5702 100644
--- a/src/unittests/resources/map/maplayer/drawfringesimple.cc
+++ b/src/unittests/resources/map/maplayer/drawfringesimple.cc
@@ -51,7 +51,6 @@ TEST_CASE("MapLayer drawFringe simple", "")
{
setEnv("SDL_VIDEODRIVER", "dummy");
- logger = new Logger;
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -504,5 +503,4 @@ TEST_CASE("MapLayer drawFringe simple", "")
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/drawspeciallayer1.cc b/src/unittests/resources/map/maplayer/drawspeciallayer1.cc
index 2927deb48..0940e4279 100644
--- a/src/unittests/resources/map/maplayer/drawspeciallayer1.cc
+++ b/src/unittests/resources/map/maplayer/drawspeciallayer1.cc
@@ -31,7 +31,6 @@
#include "unittests/render/mockgraphics.h"
-#include "utils/delete2.h"
#include "utils/env.h"
#include "resources/resourcemanager/resourcemanager.h"
@@ -48,7 +47,6 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)", "")
{
setEnv("SDL_VIDEODRIVER", "dummy");
- logger = new Logger;
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -394,5 +392,4 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)", "")
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/drawspeciallayer2.cc b/src/unittests/resources/map/maplayer/drawspeciallayer2.cc
index ec101a099..8aa0ccf8b 100644
--- a/src/unittests/resources/map/maplayer/drawspeciallayer2.cc
+++ b/src/unittests/resources/map/maplayer/drawspeciallayer2.cc
@@ -31,7 +31,6 @@
#include "unittests/render/mockgraphics.h"
-#include "utils/delete2.h"
#include "utils/env.h"
#include "resources/resourcemanager/resourcemanager.h"
@@ -48,7 +47,6 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)", "")
{
setEnv("SDL_VIDEODRIVER", "dummy");
- logger = new Logger;
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -400,5 +398,4 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)", "")
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/getemptytiledrawwidth.cc b/src/unittests/resources/map/maplayer/getemptytiledrawwidth.cc
index 679a09271..a5378ce86 100644
--- a/src/unittests/resources/map/maplayer/getemptytiledrawwidth.cc
+++ b/src/unittests/resources/map/maplayer/getemptytiledrawwidth.cc
@@ -22,9 +22,6 @@
#include "configmanager.h"
#include "dirs.h"
-#include "logger.h"
-
-#include "utils/delete2.h"
#include "resources/image/image.h"
@@ -34,8 +31,6 @@
TEST_CASE("MapLayer getEmptyTileDrawWidth", "")
{
- logger = new Logger;
-
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -164,5 +159,4 @@ TEST_CASE("MapLayer getEmptyTileDrawWidth", "")
delete img1;
delete img2;
delete img3;
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/gettiledrawwidth.cc b/src/unittests/resources/map/maplayer/gettiledrawwidth.cc
index 53fde8f49..121e14530 100644
--- a/src/unittests/resources/map/maplayer/gettiledrawwidth.cc
+++ b/src/unittests/resources/map/maplayer/gettiledrawwidth.cc
@@ -22,9 +22,6 @@
#include "configmanager.h"
#include "dirs.h"
-#include "logger.h"
-
-#include "utils/delete2.h"
#include "resources/image/image.h"
@@ -34,8 +31,6 @@
TEST_CASE("MapLayer getTileDrawWidth", "")
{
- logger = new Logger;
-
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -401,5 +396,4 @@ TEST_CASE("MapLayer getTileDrawWidth", "")
delete img1;
delete img2;
delete img3;
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/updatecache.cc b/src/unittests/resources/map/maplayer/updatecache.cc
index 3cf7e8981..eaff5ac5d 100644
--- a/src/unittests/resources/map/maplayer/updatecache.cc
+++ b/src/unittests/resources/map/maplayer/updatecache.cc
@@ -22,9 +22,6 @@
#include "configmanager.h"
#include "dirs.h"
-#include "logger.h"
-
-#include "utils/delete2.h"
#include "resources/image/image.h"
@@ -34,8 +31,6 @@
TEST_CASE("MapLayer updateCache", "")
{
- logger = new Logger;
-
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -401,5 +396,4 @@ TEST_CASE("MapLayer updateCache", "")
delete img1;
delete img2;
delete img3;
- delete2(logger);
}
diff --git a/src/unittests/resources/map/maplayer/updateconditiontiles.cc b/src/unittests/resources/map/maplayer/updateconditiontiles.cc
index 73ed58108..f9b7cffc2 100644
--- a/src/unittests/resources/map/maplayer/updateconditiontiles.cc
+++ b/src/unittests/resources/map/maplayer/updateconditiontiles.cc
@@ -22,12 +22,9 @@
#include "configmanager.h"
#include "dirs.h"
-#include "logger.h"
#include "enums/resources/map/blockmask.h"
-#include "utils/delete2.h"
-
#include "resources/image/image.h"
#include "resources/map/map.h"
@@ -37,8 +34,6 @@
TEST_CASE("MapLayer updateConditionTiles", "")
{
- logger = new Logger;
-
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -233,5 +228,4 @@ TEST_CASE("MapLayer updateConditionTiles", "")
delete map;
delete img1;
- delete2(logger);
}
diff --git a/src/unittests/resources/map/speciallayer.cc b/src/unittests/resources/map/speciallayer.cc
index 49b50c932..f2de1db43 100644
--- a/src/unittests/resources/map/speciallayer.cc
+++ b/src/unittests/resources/map/speciallayer.cc
@@ -51,7 +51,6 @@ TEST_CASE("SpecialLayer updateCache", "")
{
setEnv("SDL_VIDEODRIVER", "dummy");
- logger = new Logger;
client = new Client;
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -285,5 +284,4 @@ TEST_CASE("SpecialLayer updateCache", "")
delete2(client);
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
}