summaryrefslogtreecommitdiff
path: root/src/resources/dye
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-01 04:50:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-01 04:50:26 +0300
commit7df01a8695e46e7e8cce603782f0e16caf54169b (patch)
tree030a0125429c9605c24ad74e3d523fd900f155cd /src/resources/dye
parent0f172abb004bed203f8bf329e4f43eb174a8a58c (diff)
downloadmanaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.gz
manaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.bz2
manaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.xz
manaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.zip
Fix tests running without physfs.
Diffstat (limited to 'src/resources/dye')
-rw-r--r--src/resources/dye/dye_unittest.cc6
-rw-r--r--src/resources/dye/dyepalette_unittest.cc6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/dye/dye_unittest.cc b/src/resources/dye/dye_unittest.cc
index d562118b3..cc368d865 100644
--- a/src/resources/dye/dye_unittest.cc
+++ b/src/resources/dye/dye_unittest.cc
@@ -2359,6 +2359,8 @@ TEST_CASE("Dye real dye")
SDL_Init(SDL_INIT_VIDEO);
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);
@@ -2392,6 +2394,10 @@ TEST_CASE("Dye real dye")
dyeCheck("|A:#0000FFFF,FF000050", "arrow_up_A.png");
}
delete2(client);
+ VirtFs::removeDirFromSearchPath("data");
+ VirtFs::removeDirFromSearchPath("../data");
+ VirtFs::removeDirFromSearchPath("data/test");
+ VirtFs::removeDirFromSearchPath("../data/test");
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc
index 285ac22a8..7df69e952 100644
--- a/src/resources/dye/dyepalette_unittest.cc
+++ b/src/resources/dye/dyepalette_unittest.cc
@@ -60,6 +60,8 @@ TEST_CASE("DyePalette tests")
SDL_Init(SDL_INIT_VIDEO);
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);
@@ -382,6 +384,10 @@ TEST_CASE("DyePalette tests")
REQUIRE(palette.mColors[0].value[3] == 0x77);
}
delete2(client);
+ VirtFs::removeDirFromSearchPath("data");
+ VirtFs::removeDirFromSearchPath("../data");
+ VirtFs::removeDirFromSearchPath("data/test");
+ VirtFs::removeDirFromSearchPath("../data/test");
delete2(logger);
// VirtFs::deinit();
}