diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-29 20:26:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-29 20:26:16 +0300 |
commit | 9ff7894ef1eeff001f3ddc1a1caec18176428fa1 (patch) | |
tree | d6c8dc8dc37d752ac046552ff5e8226fa73a9ed6 /src/resources | |
parent | 7e0e97ee7ec31512731cbcef625a040266655062 (diff) | |
download | mv-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.tar.gz mv-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.tar.bz2 mv-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.tar.xz mv-9ff7894ef1eeff001f3ddc1a1caec18176428fa1.zip |
Add some cleanup calls in unit tests.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/dye/dye_unittest.cc | 6 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_unittest.cc | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/dye/dye_unittest.cc b/src/resources/dye/dye_unittest.cc index 074854d32..6b6f1719a 100644 --- a/src/resources/dye/dye_unittest.cc +++ b/src/resources/dye/dye_unittest.cc @@ -24,6 +24,8 @@ #include "graphicsmanager.h" #include "logger.h" +#include "being/actorsprite.h" + #include "resources/sdlimagehelper.h" #ifdef USE_SDL2 #include "resources/surfaceimagehelper.h" @@ -38,6 +40,7 @@ #include "resources/resourcemanager/resourcemanager.h" +#include "utils/delete2.h" #include "utils/env.h" #include "utils/physfstools.h" @@ -330,6 +333,8 @@ TEST_CASE("Dye real dye") graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif + ActorSprite::load(); + SECTION("B dye") { dyeCheck("|B:#FFC88A", "arrow_up_B.png"); @@ -344,4 +349,5 @@ TEST_CASE("Dye real dye") { dyeCheck("|A:#0000FFFF,FF000050", "arrow_up_A.png"); } + delete2(client); } diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc index 8689cdf6f..9d9f5fda6 100644 --- a/src/resources/dye/dyepalette_unittest.cc +++ b/src/resources/dye/dyepalette_unittest.cc @@ -25,6 +25,8 @@ #include "logger.h" #include "graphicsmanager.h" +#include "being/actorsprite.h" + #include "resources/sdlimagehelper.h" #include "resources/db/palettedb.h" @@ -33,6 +35,7 @@ #include "resources/resourcemanager/resourcemanager.h" +#include "utils/delete2.h" #include "utils/env.h" #include "utils/physfstools.h" @@ -65,6 +68,7 @@ TEST_CASE("DyePalette tests") graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif + ActorSprite::load(); paths.setDefaultValues(getPathsDefaults()); PaletteDB::load(); @@ -367,4 +371,5 @@ TEST_CASE("DyePalette tests") REQUIRE(palette.mColors[0].value[2] == 46); REQUIRE(palette.mColors[0].value[3] == 0x77); } + delete2(client); } |