summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-09 03:31:42 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-09 03:31:42 +0300
commit612873fa462d74a31bdd3977dac7919376038275 (patch)
tree86c7ce3cb5a0d334bcba5d463846a88e03a8669e /src/utils
parent8470d3c82d84a6bd7767de6763153aa9cdfb991b (diff)
downloadplus-612873fa462d74a31bdd3977dac7919376038275.tar.gz
plus-612873fa462d74a31bdd3977dac7919376038275.tar.bz2
plus-612873fa462d74a31bdd3977dac7919376038275.tar.xz
plus-612873fa462d74a31bdd3977dac7919376038275.zip
Simplify add/remove dirs and zips methods in virtfs.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/chatutils_unittest.cc8
-rw-r--r--src/utils/stringutils_unittest.cc16
-rw-r--r--src/utils/translation/poparser_unittest.cc8
-rw-r--r--src/utils/xml_unittest.cc8
-rw-r--r--src/utils/xmlutils_unittest.cc32
5 files changed, 36 insertions, 36 deletions
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc
index 7b3dd251e..e343576fe 100644
--- a/src/utils/chatutils_unittest.cc
+++ b/src/utils/chatutils_unittest.cc
@@ -57,8 +57,8 @@ TEST_CASE("chatutils replaceVars")
SDL_Init(SDL_INIT_VIDEO);
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
theme = new Theme;
Theme::selectSkin();
imageHelper = new SDLImageHelper();
@@ -247,8 +247,8 @@ TEST_CASE("chatutils replaceVars")
delete2(actorManager);
delete2(localPlayer);
delete2(client);
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc
index cf0e880aa..dd60af3cd 100644
--- a/src/utils/stringutils_unittest.cc
+++ b/src/utils/stringutils_unittest.cc
@@ -1399,10 +1399,10 @@ TEST_CASE("stringuntils replaceItemLinks")
{
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
- VirtFs::addDirToSearchPathSilent("data/test", Append_false);
- VirtFs::addDirToSearchPathSilent("../data/test", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data/test", Append_false);
+ VirtFs::mountDirSilent("../data/test", Append_false);
ItemDB::NamedItemInfos &namedInfos = ItemDB::getNamedItemInfosTest();
ItemDB::ItemInfos &infos = ItemDB::getItemInfosTest();
@@ -1623,10 +1623,10 @@ TEST_CASE("stringuntils replaceItemLinks")
delete_all(infos);
infos.clear();
namedInfos.clear();
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
- VirtFs::removeDirFromSearchPathSilent("data/test");
- VirtFs::removeDirFromSearchPathSilent("../data/test");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
+ VirtFs::unmountDirSilent("data/test");
+ VirtFs::unmountDirSilent("../data/test");
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/translation/poparser_unittest.cc b/src/utils/translation/poparser_unittest.cc
index ff8370344..a296180f8 100644
--- a/src/utils/translation/poparser_unittest.cc
+++ b/src/utils/translation/poparser_unittest.cc
@@ -53,8 +53,8 @@ TEST_CASE("PoParser tests", "PoParser")
client = new Client;
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
@@ -132,8 +132,8 @@ TEST_CASE("PoParser tests", "PoParser")
delete dict;
}
delete2(client);
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc
index 8cdebf86f..fc7818085 100644
--- a/src/utils/xml_unittest.cc
+++ b/src/utils/xml_unittest.cc
@@ -54,8 +54,8 @@ TEST_CASE("xml doc")
XML::initXML();
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
#ifdef USE_SDL2
@@ -368,8 +368,8 @@ TEST_CASE("xml doc")
}
delete2(theme);
delete2(client);
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
delete2(logger);
// VirtFs::deinit();
diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc
index b28d3ec9d..41096bc05 100644
--- a/src/utils/xmlutils_unittest.cc
+++ b/src/utils/xmlutils_unittest.cc
@@ -44,8 +44,8 @@ TEST_CASE("xmlutils readXmlIntVector 1")
XML::initXML();
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
@@ -78,8 +78,8 @@ TEST_CASE("xmlutils readXmlIntVector 1")
REQUIRE(1 == arr[4]);
delete2(client);
ResourceManager::deleteInstance();
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
delete2(logger);
// VirtFs::deinit();
}
@@ -90,8 +90,8 @@ TEST_CASE("xmlutils readXmlStringMap 1")
XML::initXML();
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
@@ -123,8 +123,8 @@ TEST_CASE("xmlutils readXmlStringMap 1")
REQUIRE(arr["Metal"] == "26");
delete2(client);
ResourceManager::deleteInstance();
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
delete2(logger);
// VirtFs::deinit();
}
@@ -135,10 +135,10 @@ TEST_CASE("xmlutils readXmlIntMap 1")
XML::initXML();
logger = new Logger();
ResourceManager::init();
- VirtFs::addDirToSearchPathSilent("data", Append_false);
- VirtFs::addDirToSearchPathSilent("../data", Append_false);
- VirtFs::addDirToSearchPathSilent("data/test", Append_false);
- VirtFs::addDirToSearchPathSilent("../data/test", Append_false);
+ VirtFs::mountDirSilent("data", Append_false);
+ VirtFs::mountDirSilent("../data", Append_false);
+ VirtFs::mountDirSilent("data/test", Append_false);
+ VirtFs::mountDirSilent("../data/test", Append_false);
mainGraphics = new SDLGraphics;
imageHelper = new SDLImageHelper();
@@ -170,10 +170,10 @@ TEST_CASE("xmlutils readXmlIntMap 1")
REQUIRE(arr[3] == 0);
delete2(client);
ResourceManager::deleteInstance();
- VirtFs::removeDirFromSearchPathSilent("data/test");
- VirtFs::removeDirFromSearchPathSilent("../data/test");
- VirtFs::removeDirFromSearchPathSilent("data");
- VirtFs::removeDirFromSearchPathSilent("../data");
+ VirtFs::unmountDirSilent("data/test");
+ VirtFs::unmountDirSilent("../data/test");
+ VirtFs::unmountDirSilent("data");
+ VirtFs::unmountDirSilent("../data");
delete2(logger);
// VirtFs::deinit();
}