From 6388446b85e1fa5deccc6d5c1683fba88ef53d99 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 27 Feb 2017 18:16:39 +0300 Subject: Add functions pointers into VirtFile. From VirtFs call if possible pointer from VirtFile. --- src/fs/virtfszip_unittest.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/fs/virtfszip_unittest.cc') diff --git a/src/fs/virtfszip_unittest.cc b/src/fs/virtfszip_unittest.cc index 3988ffc0c..05167a358 100644 --- a/src/fs/virtfszip_unittest.cc +++ b/src/fs/virtfszip_unittest.cc @@ -32,12 +32,15 @@ TEST_CASE("VirtFsZip getEntries") { + VirtFsZip::init(); REQUIRE(VirtFsZip::getEntries().empty()); REQUIRE(VirtFsZip::searchEntryByArchive("test.zip") == nullptr); + VirtFsZip::deinit(); } TEST_CASE("VirtFsZip addToSearchPath") { + VirtFsZip::init(); logger = new Logger(); std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -165,6 +168,7 @@ TEST_CASE("VirtFsZip addToSearchPath") TEST_CASE("VirtFsZip removeFromSearchPath") { + VirtFsZip::init(); logger = new Logger(); std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -238,6 +242,7 @@ TEST_CASE("VirtFsZip removeFromSearchPath") TEST_CASE("VirtFsZip exists") { + VirtFsZip::init(); logger = new Logger(); VirtFsZip::addToSearchPathSilent("data/test/test2.zip", Append_false); @@ -281,6 +286,7 @@ TEST_CASE("VirtFsZip exists") TEST_CASE("VirtFsZip getRealDir") { + VirtFsZip::init(); logger = new Logger(); std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -332,6 +338,7 @@ static bool inList(VirtList *list, TEST_CASE("VirtFsZip enumerateFiles1") { + VirtFsZip::init(); logger = new Logger; std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -356,6 +363,7 @@ TEST_CASE("VirtFsZip enumerateFiles1") TEST_CASE("VirtFsZip enumerateFiles2") { + VirtFsZip::init(); logger = new Logger; std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -391,6 +399,7 @@ TEST_CASE("VirtFsZip enumerateFiles2") TEST_CASE("VirtFsZip isDirectory") { + VirtFsZip::init(); logger = new Logger(); std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -476,6 +485,7 @@ TEST_CASE("VirtFsZip isDirectory") TEST_CASE("VirtFsZip openRead") { + VirtFsZip::init(); logger = new Logger(); std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -543,6 +553,7 @@ TEST_CASE("VirtFsZip openRead") TEST_CASE("VirtFsZip read") { + VirtFsZip::init(); logger = new Logger(); std::string name("data/test/test.zip"); std::string prefix("data/test/"); @@ -667,5 +678,6 @@ TEST_CASE("VirtFsZip read") VirtFsZip::close(file); free(buffer); VirtFsZip::removeFromSearchPathSilent(prefix + "test2.zip"); + VirtFsZip::deinit(); delete2(logger); } -- cgit v1.2.3-70-g09d2