summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-24 02:12:55 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-24 02:12:55 +0300
commit10de3936d6da2fa17565d36715ea5af81727a5c8 (patch)
treed487cb9f9739901484499f062e1db0bf5435a4c5 /src
parent07a9b9009f7b05fc39540430fa6639b493ed9829 (diff)
downloadmv-10de3936d6da2fa17565d36715ea5af81727a5c8.tar.gz
mv-10de3936d6da2fa17565d36715ea5af81727a5c8.tar.bz2
mv-10de3936d6da2fa17565d36715ea5af81727a5c8.tar.xz
mv-10de3936d6da2fa17565d36715ea5af81727a5c8.zip
Fix unit tests.
Diffstat (limited to 'src')
-rw-r--r--src/animatedsprite_unittest.cc5
-rw-r--r--src/gui/windowmanager_unittest.cc5
-rw-r--r--src/utils/files_unittest.cc5
-rw-r--r--src/utils/xmlutils_unittest.cc5
4 files changed, 8 insertions, 12 deletions
diff --git a/src/animatedsprite_unittest.cc b/src/animatedsprite_unittest.cc
index 10994c7f7..804d24187 100644
--- a/src/animatedsprite_unittest.cc
+++ b/src/animatedsprite_unittest.cc
@@ -45,9 +45,8 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
logger = new Logger();
- ResourceManager *resman = ResourceManager::getInstance();
- resman->addToSearchPath("data", false);
- resman->addToSearchPath("../data", false);
+ resourceManager->addToSearchPath("data", false);
+ resourceManager->addToSearchPath("../data", false);
imageHelper = new SDLImageHelper();
SDL_SetVideoMode(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index aa8591184..adb9f4758 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -68,9 +68,8 @@ TEST_CASE("Windows tests", "windowmanager")
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
logger = new Logger();
- ResourceManager *resman = ResourceManager::getInstance();
- resman->addToSearchPath("data", false);
- resman->addToSearchPath("../data", false);
+ resourceManager->addToSearchPath("data", false);
+ resourceManager->addToSearchPath("../data", false);
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper;
userPalette = new UserPalette;
diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc
index 5d227834e..b10c5acda 100644
--- a/src/utils/files_unittest.cc
+++ b/src/utils/files_unittest.cc
@@ -34,9 +34,8 @@ TEST_CASE("Files renameFile", "files")
PHYSFS_init("manaplus");
dirSeparator = "/";
logger = new Logger();
- const ResourceManager *const resman = ResourceManager::getInstance();
- resman->addToSearchPath("data", false);
- resman->addToSearchPath("../data", false);
+ resourceManager->addToSearchPath("data", false);
+ resourceManager->addToSearchPath("../data", false);
const int sz = 1234567;
char *buf = new char[sz];
diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc
index 5cf2fad96..1fc6e44bc 100644
--- a/src/utils/xmlutils_unittest.cc
+++ b/src/utils/xmlutils_unittest.cc
@@ -38,9 +38,8 @@ TEST_CASE("xmlutils readXmlIntVector 1")
dirSeparator = "/";
XML::initXML();
logger = new Logger();
- ResourceManager *resman = ResourceManager::getInstance();
- resman->addToSearchPath("data", false);
- resman->addToSearchPath("../data", false);
+ resourceManager->addToSearchPath("data", false);
+ resourceManager->addToSearchPath("../data", false);
std::vector<int> arr;