diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-01-05 17:00:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-05 17:00:02 +0300 |
commit | 855387d2d795c9471587cc7ddf2c66bb676d698e (patch) | |
tree | 3dbb1260c219312f36893dfae52f5cd40760aeb5 /src/utils/stringutils_unittest.cc | |
parent | 9fefb2942865846ccb7dbdac4ebd4515b8c851a2 (diff) | |
download | manaplus-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.gz manaplus-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.bz2 manaplus-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.xz manaplus-855387d2d795c9471587cc7ddf2c66bb676d698e.zip |
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.
Diffstat (limited to 'src/utils/stringutils_unittest.cc')
-rw-r--r-- | src/utils/stringutils_unittest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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"); |