diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-09 03:31:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-09 03:31:42 +0300 |
commit | 612873fa462d74a31bdd3977dac7919376038275 (patch) | |
tree | 86c7ce3cb5a0d334bcba5d463846a88e03a8669e /src/resources | |
parent | 8470d3c82d84a6bd7767de6763153aa9cdfb991b (diff) | |
download | plus-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/resources')
-rw-r--r-- | src/resources/dye/dye_unittest.cc | 16 | ||||
-rw-r--r-- | src/resources/dye/dyepalette_unittest.cc | 16 | ||||
-rw-r--r-- | src/resources/map/maplayer_unittest.cc | 24 | ||||
-rw-r--r-- | src/resources/map/speciallayer_unittest.cc | 8 | ||||
-rw-r--r-- | src/resources/resourcemanager/resourcemanager_unittest.cc | 8 | ||||
-rw-r--r-- | src/resources/sprite/animatedsprite_unittest.cc | 8 |
6 files changed, 40 insertions, 40 deletions
diff --git a/src/resources/dye/dye_unittest.cc b/src/resources/dye/dye_unittest.cc index a092357f5..62db73d09 100644 --- a/src/resources/dye/dye_unittest.cc +++ b/src/resources/dye/dye_unittest.cc @@ -2358,10 +2358,10 @@ TEST_CASE("Dye real dye") SDL_Init(SDL_INIT_VIDEO); 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); #ifdef USE_SDL2 imageHelper = new SurfaceImageHelper; @@ -2393,10 +2393,10 @@ TEST_CASE("Dye real dye") dyeCheck("|A:#0000FFFF,FF000050", "arrow_up_A.png"); } delete2(client); - 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/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc index f475e7dab..3305988e9 100644 --- a/src/resources/dye/dyepalette_unittest.cc +++ b/src/resources/dye/dyepalette_unittest.cc @@ -61,10 +61,10 @@ TEST_CASE("DyePalette tests") SDL_Init(SDL_INIT_VIDEO); 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(); @@ -392,10 +392,10 @@ TEST_CASE("DyePalette tests") REQUIRE(palette.mColors[0].value[3] == 0x77); } delete2(client); - 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/resources/map/maplayer_unittest.cc b/src/resources/map/maplayer_unittest.cc index 58821682c..2bcbdbeae 100644 --- a/src/resources/map/maplayer_unittest.cc +++ b/src/resources/map/maplayer_unittest.cc @@ -1650,8 +1650,8 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)") { 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); imageHelper = new SDLImageHelper; #ifdef USE_SDL2 @@ -1994,8 +1994,8 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)") delete map; delete mock; GraphicsManager::deleteRenderers(); - VirtFs::removeDirFromSearchPathSilent("data"); - VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::unmountDirSilent("data"); + VirtFs::unmountDirSilent("../data"); delete2(logger); } @@ -2003,8 +2003,8 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)") { 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); imageHelper = new SDLImageHelper; #ifdef USE_SDL2 @@ -2353,8 +2353,8 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)") delete map; delete mock; GraphicsManager::deleteRenderers(); - VirtFs::removeDirFromSearchPathSilent("data"); - VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::unmountDirSilent("data"); + VirtFs::unmountDirSilent("../data"); delete2(logger); } @@ -2362,8 +2362,8 @@ TEST_CASE("MapLayer drawFringe") { 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); imageHelper = new SDLImageHelper; #ifdef USE_SDL2 @@ -3240,7 +3240,7 @@ TEST_CASE("MapLayer drawFringe") delete mock; delete2(theme); GraphicsManager::deleteRenderers(); - VirtFs::removeDirFromSearchPathSilent("data"); - VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::unmountDirSilent("data"); + VirtFs::unmountDirSilent("../data"); delete2(logger); } diff --git a/src/resources/map/speciallayer_unittest.cc b/src/resources/map/speciallayer_unittest.cc index cda761896..2e4e294c4 100644 --- a/src/resources/map/speciallayer_unittest.cc +++ b/src/resources/map/speciallayer_unittest.cc @@ -45,8 +45,8 @@ TEST_CASE("SpecialLayer updateCache") logger = new Logger; client = new Client; ResourceManager::init(); - VirtFs::addDirToSearchPathSilent("data", Append_false); - VirtFs::addDirToSearchPathSilent("../data", Append_false); + VirtFs::mountDirSilent("data", Append_false); + VirtFs::mountDirSilent("../data", Append_false); imageHelper = new SDLImageHelper; #ifdef USE_SDL2 @@ -262,7 +262,7 @@ TEST_CASE("SpecialLayer updateCache") delete layer; resourceManager->cleanOrphans(); delete2(client); - VirtFs::removeDirFromSearchPathSilent("data"); - VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::unmountDirSilent("data"); + VirtFs::unmountDirSilent("../data"); delete2(logger); } diff --git a/src/resources/resourcemanager/resourcemanager_unittest.cc b/src/resources/resourcemanager/resourcemanager_unittest.cc index ccb2a792a..d85202f32 100644 --- a/src/resources/resourcemanager/resourcemanager_unittest.cc +++ b/src/resources/resourcemanager/resourcemanager_unittest.cc @@ -95,8 +95,8 @@ TEST_CASE("resourcemanager", "resourcemanager") logger = new Logger(); ResourceManager::init(); ResourceManager *safeResman = resourceManager; - VirtFs::addDirToSearchPathSilent("data", Append_false); - VirtFs::addDirToSearchPathSilent("../data", Append_false); + VirtFs::mountDirSilent("data", Append_false); + VirtFs::mountDirSilent("../data", Append_false); imageHelper = new SDLImageHelper(); #ifdef USE_SDL2 @@ -659,8 +659,8 @@ TEST_CASE("resourcemanager", "resourcemanager") delete resourceManager; resourceManager = safeResman; delete2(client); - VirtFs::removeDirFromSearchPathSilent("data"); - VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::unmountDirSilent("data"); + VirtFs::unmountDirSilent("../data"); delete2(logger); // VirtFs::deinit(); } diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc index 2a05a40bf..cefc99dc3 100644 --- a/src/resources/sprite/animatedsprite_unittest.cc +++ b/src/resources/sprite/animatedsprite_unittest.cc @@ -64,8 +64,8 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") 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); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper(); #ifdef USE_SDL2 @@ -191,8 +191,8 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") } delete2(client); - VirtFs::removeDirFromSearchPathSilent("data"); - VirtFs::removeDirFromSearchPathSilent("../data"); + VirtFs::unmountDirSilent("data"); + VirtFs::unmountDirSilent("../data"); delete2(logger); // VirtFs::deinit(); } |