summaryrefslogtreecommitdiff
path: root/src/utils/stringutils_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-05 17:00:02 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-05 17:00:02 +0300
commit855387d2d795c9471587cc7ddf2c66bb676d698e (patch)
tree3dbb1260c219312f36893dfae52f5cd40760aeb5 /src/utils/stringutils_unittest.cc
parent9fefb2942865846ccb7dbdac4ebd4515b8c851a2 (diff)
downloadmv-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.gz
mv-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.bz2
mv-855387d2d795c9471587cc7ddf2c66bb676d698e.tar.xz
mv-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.cc5
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");