summaryrefslogtreecommitdiff
path: root/src/unittests/resources
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
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')
-rw-r--r--src/unittests/resources/dye/dye.cc3
-rw-r--r--src/unittests/resources/dye/dyepalette.cc3
-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
-rw-r--r--src/unittests/resources/resourcemanager/resourcemanager.cc3
-rw-r--r--src/unittests/resources/sdlimagehelper.cc2
-rw-r--r--src/unittests/resources/sprite/animatedsprite.cc3
15 files changed, 0 insertions, 52 deletions
diff --git a/src/unittests/resources/dye/dye.cc b/src/unittests/resources/dye/dye.cc
index 499e570ea..ada0f5d40 100644
--- a/src/unittests/resources/dye/dye.cc
+++ b/src/unittests/resources/dye/dye.cc
@@ -1958,7 +1958,6 @@ TEST_CASE("Dye real dye", "")
client = new Client;
SDL_Init(SDL_INIT_VIDEO);
- logger = new Logger();
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
VirtFs::mountDirSilent("data/test", Append_false);
@@ -2012,6 +2011,4 @@ TEST_CASE("Dye real dye", "")
VirtFs::unmountDirSilent("../data");
VirtFs::unmountDirSilent("data/test");
VirtFs::unmountDirSilent("../data/test");
- delete2(logger);
-// VirtFs::deinit();
}
diff --git a/src/unittests/resources/dye/dyepalette.cc b/src/unittests/resources/dye/dyepalette.cc
index 7c49f02c1..47f7266a4 100644
--- a/src/unittests/resources/dye/dyepalette.cc
+++ b/src/unittests/resources/dye/dyepalette.cc
@@ -60,7 +60,6 @@ TEST_CASE("DyePalette tests", "")
client = new Client;
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
- logger = new Logger();
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
VirtFs::mountDirSilent("data/test", Append_false);
@@ -397,6 +396,4 @@ TEST_CASE("DyePalette tests", "")
VirtFs::unmountDirSilent("../data");
VirtFs::unmountDirSilent("data/test");
VirtFs::unmountDirSilent("../data/test");
- delete2(logger);
-// VirtFs::deinit();
}
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);
}
diff --git a/src/unittests/resources/resourcemanager/resourcemanager.cc b/src/unittests/resources/resourcemanager/resourcemanager.cc
index 66656558b..9552089fd 100644
--- a/src/unittests/resources/resourcemanager/resourcemanager.cc
+++ b/src/unittests/resources/resourcemanager/resourcemanager.cc
@@ -97,7 +97,6 @@ TEST_CASE("resourcemanager", "resourcemanager")
client = new Client;
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
- logger = new Logger();
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -690,6 +689,4 @@ TEST_CASE("resourcemanager", "resourcemanager")
delete2(client);
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
-// VirtFs::deinit();
}
diff --git a/src/unittests/resources/sdlimagehelper.cc b/src/unittests/resources/sdlimagehelper.cc
index e76e6f26d..1208a5ef2 100644
--- a/src/unittests/resources/sdlimagehelper.cc
+++ b/src/unittests/resources/sdlimagehelper.cc
@@ -75,7 +75,6 @@ TEST_CASE("sdlimagehelper combineSurface", "")
setEnv("SDL_VIDEODRIVER", "dummy");
client = new Client;
- logger = new Logger();
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
@@ -553,7 +552,6 @@ TEST_CASE("sdlimagehelper combineSurface", "")
delete2(client);
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
}
#endif // SDL_BYTEORDER == SDL_LIL_ENDIAN
diff --git a/src/unittests/resources/sprite/animatedsprite.cc b/src/unittests/resources/sprite/animatedsprite.cc
index 0dab6d9cd..3d778b403 100644
--- a/src/unittests/resources/sprite/animatedsprite.cc
+++ b/src/unittests/resources/sprite/animatedsprite.cc
@@ -64,7 +64,6 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
client = new Client;
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
- logger = new Logger();
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
mainGraphics = new SDLGraphics;
@@ -195,6 +194,4 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
delete2(client);
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
- delete2(logger);
-// VirtFs::deinit();
}