summaryrefslogtreecommitdiff
path: root/src/resources/sprite/animatedsprite_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/sprite/animatedsprite_unittest.cc')
-rw-r--r--src/resources/sprite/animatedsprite_unittest.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc
index bf151308c..a46fad9b0 100644
--- a/src/resources/sprite/animatedsprite_unittest.cc
+++ b/src/resources/sprite/animatedsprite_unittest.cc
@@ -28,8 +28,11 @@
#include "being/actorsprite.h"
+#include "gui/gui.h"
#include "gui/theme.h"
+#include "render/sdlgraphics.h"
+
#include "resources/sdlimagehelper.h"
#include "resources/animation/animation.h"
@@ -52,7 +55,6 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
initRand();
client = new Client;
- PHYSFS_init("manaplus");
dirSeparator = "/";
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
@@ -60,8 +62,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
ResourceManager::init();
resourceManager->addToSearchPath("data", Append_false);
resourceManager->addToSearchPath("../data", Append_false);
- theme = new Theme;
- Theme::selectSkin();
+ mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
#ifdef USE_SDL2
SDLImageHelper::setRenderer(graphicsManager.createRenderer(
@@ -72,7 +73,11 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
+ theme = new Theme;
+ Theme::selectSkin();
ActorSprite::load();
+ gui = new Gui();
+ gui->postInit(mainGraphics);
SECTION("basic test 1")
{
@@ -92,6 +97,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
REQUIRE(10 == sprite->getFrameTime());
REQUIRE(0 == sprite->getFrameIndex());
delete sprite;
+ logger->log("test4");
}
SECTION("basic test 2")