diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-18 22:51:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-18 22:53:01 +0300 |
commit | 40de3bee0278d6584561a827123bc342934adccb (patch) | |
tree | 460ba68f29ec25377ef1971989c4c46e507ea3da /src/resources/map | |
parent | dffd0a4a8e99196ad27f8fde2430b09dd29cac57 (diff) | |
download | manaverse-40de3bee0278d6584561a827123bc342934adccb.tar.gz manaverse-40de3bee0278d6584561a827123bc342934adccb.tar.bz2 manaverse-40de3bee0278d6584561a827123bc342934adccb.tar.xz manaverse-40de3bee0278d6584561a827123bc342934adccb.zip |
Add support for additional unit test library doctest.
Diffstat (limited to 'src/resources/map')
-rw-r--r-- | src/resources/map/maplayer_unittest.cc | 23 | ||||
-rw-r--r-- | src/resources/map/speciallayer_unittest.cc | 9 |
2 files changed, 21 insertions, 11 deletions
diff --git a/src/resources/map/maplayer_unittest.cc b/src/resources/map/maplayer_unittest.cc index 692a4738f..cdd948670 100644 --- a/src/resources/map/maplayer_unittest.cc +++ b/src/resources/map/maplayer_unittest.cc @@ -32,6 +32,7 @@ #include "gui/theme.h" #include "utils/delete2.h" +#include "utils/env.h" #include "render/mockgraphics.h" @@ -45,7 +46,7 @@ #include "debug.h" -TEST_CASE("MapLayer getTileDrawWidth") +TEST_CASE("MapLayer getTileDrawWidth", "") { Image *const img1 = new Image(32, 32); Image *const img2 = new Image(32, 32); @@ -410,7 +411,7 @@ TEST_CASE("MapLayer getTileDrawWidth") } -TEST_CASE("MapLayer getEmptyTileDrawWidth") +TEST_CASE("MapLayer getEmptyTileDrawWidth", "") { Image *const img1 = new Image(32, 32); Image *const img2 = new Image(32, 32); @@ -538,7 +539,7 @@ TEST_CASE("MapLayer getEmptyTileDrawWidth") } -TEST_CASE("MapLayer updateCache") +TEST_CASE("MapLayer updateCache", "") { Image *const img1 = new Image(32, 32); Image *const img2 = new Image(32, 32); @@ -902,7 +903,7 @@ TEST_CASE("MapLayer updateCache") delete img3; } -TEST_CASE("MapLayer updateConditionTiles") +TEST_CASE("MapLayer updateConditionTiles", "") { Image *const img1 = new Image(32, 32); Map *map = nullptr; @@ -1095,7 +1096,7 @@ TEST_CASE("MapLayer updateConditionTiles") delete img1; } -TEST_CASE("MapLayer draw") +TEST_CASE("MapLayer draw", "") { Image *const img1 = new Image(32, 32); Image *const img2 = new Image(32, 32); @@ -1645,8 +1646,10 @@ TEST_CASE("MapLayer draw") delete mock; } -TEST_CASE("MapLayer drawSpecialLayer (specialLayer)") +TEST_CASE("MapLayer drawSpecialLayer (specialLayer)", "") { + setEnv("SDL_VIDEODRIVER", "dummy"); + logger = new Logger; VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -1997,8 +2000,10 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)") delete2(logger); } -TEST_CASE("MapLayer drawSpecialLayer (tempLayer)") +TEST_CASE("MapLayer drawSpecialLayer (tempLayer)", "") { + setEnv("SDL_VIDEODRIVER", "dummy"); + logger = new Logger; VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -2355,8 +2360,10 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)") delete2(logger); } -TEST_CASE("MapLayer drawFringe") +TEST_CASE("MapLayer drawFringe", "") { + setEnv("SDL_VIDEODRIVER", "dummy"); + logger = new Logger; VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); diff --git a/src/resources/map/speciallayer_unittest.cc b/src/resources/map/speciallayer_unittest.cc index fea93e801..af84d6a77 100644 --- a/src/resources/map/speciallayer_unittest.cc +++ b/src/resources/map/speciallayer_unittest.cc @@ -34,6 +34,7 @@ #include "gui/gui.h" #include "utils/delete2.h" +#include "utils/env.h" #include "resources/sdlimagehelper.h" @@ -43,7 +44,7 @@ #include "debug.h" -TEST_CASE("SpecialLayer leak test1") +TEST_CASE("SpecialLayer leak test1", "") { logger = new Logger(); REQUIRE(gui == nullptr); @@ -52,8 +53,10 @@ TEST_CASE("SpecialLayer leak test1") delete2(logger); } -TEST_CASE("SpecialLayer updateCache") +TEST_CASE("SpecialLayer updateCache", "") { + setEnv("SDL_VIDEODRIVER", "dummy"); + logger = new Logger; client = new Client; VirtFs::mountDirSilent("data", Append_false); @@ -278,7 +281,7 @@ TEST_CASE("SpecialLayer updateCache") delete2(logger); } -TEST_CASE("SpecialLayer leak test2") +TEST_CASE("SpecialLayer leak test2", "") { logger = new Logger(); REQUIRE(gui == nullptr); |