From 732c2012ec337bfebb1a12c1822e98e5c61e79bc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 24 Aug 2015 22:53:11 +0300 Subject: Add missing resource manager init into unit tests. --- src/animatedsprite_unittest.cc | 1 + src/gui/windowmanager_unittest.cc | 1 + src/utils/files_unittest.cc | 1 + src/utils/xmlutils_unittest.cc | 1 + 4 files changed, 4 insertions(+) diff --git a/src/animatedsprite_unittest.cc b/src/animatedsprite_unittest.cc index 804d24187..3256f6dc7 100644 --- a/src/animatedsprite_unittest.cc +++ b/src/animatedsprite_unittest.cc @@ -45,6 +45,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") XML::initXML(); SDL_Init(SDL_INIT_VIDEO); logger = new Logger(); + ResourceManager::init(); resourceManager->addToSearchPath("data", false); resourceManager->addToSearchPath("../data", false); diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc index adb9f4758..d54851514 100644 --- a/src/gui/windowmanager_unittest.cc +++ b/src/gui/windowmanager_unittest.cc @@ -68,6 +68,7 @@ TEST_CASE("Windows tests", "windowmanager") XML::initXML(); SDL_Init(SDL_INIT_VIDEO); logger = new Logger(); + ResourceManager::init(); resourceManager->addToSearchPath("data", false); resourceManager->addToSearchPath("../data", false); mainGraphics = new SDLGraphics; diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc index b10c5acda..50805b173 100644 --- a/src/utils/files_unittest.cc +++ b/src/utils/files_unittest.cc @@ -34,6 +34,7 @@ TEST_CASE("Files renameFile", "files") PHYSFS_init("manaplus"); dirSeparator = "/"; logger = new Logger(); + ResourceManager::init(); resourceManager->addToSearchPath("data", false); resourceManager->addToSearchPath("../data", false); diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc index 1fc6e44bc..97cbd93a8 100644 --- a/src/utils/xmlutils_unittest.cc +++ b/src/utils/xmlutils_unittest.cc @@ -38,6 +38,7 @@ TEST_CASE("xmlutils readXmlIntVector 1") dirSeparator = "/"; XML::initXML(); logger = new Logger(); + ResourceManager::init(); resourceManager->addToSearchPath("data", false); resourceManager->addToSearchPath("../data", false); -- cgit v1.2.3-70-g09d2