From 855387d2d795c9471587cc7ddf2c66bb676d698e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 5 Jan 2017 17:00:02 +0300 Subject: Fix different issues in unit tests. Fix crash with some compilers flags. Clean window container to null after it was removed. Init and deinit physfs globally. --- src/utils/stringutils_unittest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/utils/stringutils_unittest.cc') diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index 481289087..1cc6049f5 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -19,6 +19,7 @@ */ #include "catch.hpp" +#include "configuration.h" #include "logger.h" #include "utils/physfstools.h" @@ -623,15 +624,17 @@ TEST_CASE("stringuntils escapeString") TEST_CASE("stringuntils replaceItemLinks") { - PHYSFS_init("manaplus"); dirSeparator = "/"; logger = new Logger(); ResourceManager::init(); resourceManager->addToSearchPath("data", Append_false); resourceManager->addToSearchPath("../data", Append_false); + resourceManager->addToSearchPath("data/test", Append_false); + resourceManager->addToSearchPath("../data/test", Append_false); ItemDB::NamedItemInfos &namedInfos = ItemDB::getNamedItemInfosTest(); ItemDB::ItemInfos &infos = ItemDB::getItemInfosTest(); + paths.setDefaultValues(getPathsDefaults()); ItemInfo *info = new ItemInfo; info->setId(123456); info->setName("test name 1"); -- cgit v1.2.3-70-g09d2