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/fs/virtfs/zip_unittest.cc | |
parent | a6c70dd1f32c38cc81cfd4b28f929d7c13d86db1 (diff) | |
download | manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.gz manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.bz2 manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.xz manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.zip |
Reimplement VirtFs in correct way. Now all tests should pass.
Diffstat (limited to 'src/fs/virtfs/zip_unittest.cc')
-rw-r--r-- | src/fs/virtfs/zip_unittest.cc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/fs/virtfs/zip_unittest.cc b/src/fs/virtfs/zip_unittest.cc index 35d4b1f8e..4b9258ec5 100644 --- a/src/fs/virtfs/zip_unittest.cc +++ b/src/fs/virtfs/zip_unittest.cc @@ -26,6 +26,7 @@ #include "fs/files.h" +#include "fs/virtfs/virtfszip.h" #include "fs/virtfs/virtzipentry.h" #include "fs/virtfs/zip.h" #include "fs/virtfs/ziplocalheader.h" @@ -46,7 +47,8 @@ TEST_CASE("Zip readArchiveInfo") { name = prefix + "data/test/test.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -66,7 +68,8 @@ TEST_CASE("Zip readArchiveInfo") { name = prefix + "data/test/test2.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -123,7 +126,8 @@ TEST_CASE("Zip readArchiveInfo") { name = prefix + "data/test/test3.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -143,7 +147,8 @@ TEST_CASE("Zip readArchiveInfo") { name = prefix + "data/test/test4.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -173,7 +178,8 @@ TEST_CASE("Zip readCompressedFile") { name = prefix + "data/test/test2.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -206,7 +212,8 @@ TEST_CASE("Zip readFile") { name = prefix + "data/test/test.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -229,7 +236,8 @@ TEST_CASE("Zip readFile") { name = prefix + "data/test/test2.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); @@ -259,7 +267,8 @@ TEST_CASE("Zip readFile") { name = prefix + "data/test/test3.zip"; - VirtZipEntry *const entry = new VirtZipEntry(name); + VirtZipEntry *const entry = new VirtZipEntry(name, + VirtFsZip::getFuncs()); std::vector<ZipLocalHeader*> &headers = entry->mHeaders; REQUIRE(Zip::readArchiveInfo(entry)); |