diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-04 00:27:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-04 01:12:19 +0300 |
commit | 79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00 (patch) | |
tree | f9669ee10e2ea3f2c41abaa84830da9efe7f9411 /src/utils | |
parent | a6c70dd1f32c38cc81cfd4b28f929d7c13d86db1 (diff) | |
download | plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.gz plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.bz2 plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.xz plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.zip |
Reimplement VirtFs in correct way. Now all tests should pass.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/chatutils_unittest.cc | 8 | ||||
-rw-r--r-- | src/utils/stringutils_unittest.cc | 16 | ||||
-rw-r--r-- | src/utils/translation/poparser_unittest.cc | 8 | ||||
-rw-r--r-- | src/utils/xml_unittest.cc | 8 | ||||
-rw-r--r-- | src/utils/xmlutils_unittest.cc | 32 |
5 files changed, 36 insertions, 36 deletions
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc index 421798227..8c237b70a 100644 --- a/src/utils/chatutils_unittest.cc +++ b/src/utils/chatutils_unittest.cc @@ -55,8 +55,8 @@ TEST_CASE("chatutils replaceVars") SDL_Init(SDL_INIT_VIDEO); logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); theme = new Theme; Theme::selectSkin(); imageHelper = new SDLImageHelper(); @@ -238,8 +238,8 @@ TEST_CASE("chatutils replaceVars") delete2(actorManager); delete2(localPlayer); delete2(client); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); delete2(logger); // VirtFs::deinit(); } diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index b0fdbf0de..31e09e4ae 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -1394,10 +1394,10 @@ TEST_CASE("stringuntils replaceItemLinks") dirSeparator = "/"; logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); - VirtFs::addDirToSearchPath("data/test", Append_false); - VirtFs::addDirToSearchPath("../data/test", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data/test", Append_false); + VirtFs::addDirToSearchPathSilent("../data/test", Append_false); ItemDB::NamedItemInfos &namedInfos = ItemDB::getNamedItemInfosTest(); ItemDB::ItemInfos &infos = ItemDB::getItemInfosTest(); @@ -1618,10 +1618,10 @@ TEST_CASE("stringuntils replaceItemLinks") delete_all(infos); infos.clear(); namedInfos.clear(); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); - VirtFs::removeDirFromSearchPath("data/test"); - VirtFs::removeDirFromSearchPath("../data/test"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::removeDirFromSearchPathSilent("data/test"); + VirtFs::removeDirFromSearchPathSilent("../data/test"); delete2(logger); // VirtFs::deinit(); } diff --git a/src/utils/translation/poparser_unittest.cc b/src/utils/translation/poparser_unittest.cc index 9182bebbc..c7fc2e560 100644 --- a/src/utils/translation/poparser_unittest.cc +++ b/src/utils/translation/poparser_unittest.cc @@ -51,8 +51,8 @@ TEST_CASE("PoParser tests", "PoParser") dirSeparator = "/"; logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper(); @@ -123,8 +123,8 @@ TEST_CASE("PoParser tests", "PoParser") delete dict; } delete2(client); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); delete2(logger); // VirtFs::deinit(); } diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc index f5211bcb5..ee5451fc6 100644 --- a/src/utils/xml_unittest.cc +++ b/src/utils/xml_unittest.cc @@ -52,8 +52,8 @@ TEST_CASE("xml doc") XML::initXML(); logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper(); #ifdef USE_SDL2 @@ -359,8 +359,8 @@ TEST_CASE("xml doc") } delete2(theme); delete2(client); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); delete2(logger); // VirtFs::deinit(); diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc index dff0b130c..6653952cc 100644 --- a/src/utils/xmlutils_unittest.cc +++ b/src/utils/xmlutils_unittest.cc @@ -45,8 +45,8 @@ TEST_CASE("xmlutils readXmlIntVector 1") XML::initXML(); logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper(); @@ -79,8 +79,8 @@ TEST_CASE("xmlutils readXmlIntVector 1") REQUIRE(1 == arr[4]); delete2(client); ResourceManager::deleteInstance(); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); delete2(logger); // VirtFs::deinit(); } @@ -92,8 +92,8 @@ TEST_CASE("xmlutils readXmlStringMap 1") XML::initXML(); logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper(); @@ -125,8 +125,8 @@ TEST_CASE("xmlutils readXmlStringMap 1") REQUIRE(arr["Metal"] == "26"); delete2(client); ResourceManager::deleteInstance(); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); delete2(logger); // VirtFs::deinit(); } @@ -138,10 +138,10 @@ TEST_CASE("xmlutils readXmlIntMap 1") XML::initXML(); logger = new Logger(); ResourceManager::init(); - VirtFs::addDirToSearchPath("data", Append_false); - VirtFs::addDirToSearchPath("../data", Append_false); - VirtFs::addDirToSearchPath("data/test", Append_false); - VirtFs::addDirToSearchPath("../data/test", Append_false); + VirtFs::addDirToSearchPathSilent("data", Append_false); + VirtFs::addDirToSearchPathSilent("../data", Append_false); + VirtFs::addDirToSearchPathSilent("data/test", Append_false); + VirtFs::addDirToSearchPathSilent("../data/test", Append_false); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper(); @@ -173,10 +173,10 @@ TEST_CASE("xmlutils readXmlIntMap 1") REQUIRE(arr[3] == 0); delete2(client); ResourceManager::deleteInstance(); - VirtFs::removeDirFromSearchPath("data/test"); - VirtFs::removeDirFromSearchPath("../data/test"); - VirtFs::removeDirFromSearchPath("data"); - VirtFs::removeDirFromSearchPath("../data"); + VirtFs::removeDirFromSearchPathSilent("data/test"); + VirtFs::removeDirFromSearchPathSilent("../data/test"); + VirtFs::removeDirFromSearchPathSilent("data"); + VirtFs::removeDirFromSearchPathSilent("../data"); delete2(logger); // VirtFs::deinit(); } |