diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-05 17:22:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-05 17:44:33 +0300 |
commit | 5aca48c5a15041a85af0709cdf1496c61c34b1dd (patch) | |
tree | 6f8c3dcf263fb20d89d51b0631d7fb06dbdff9a6 /src/fs/virtfs/zip_unittest.cc | |
parent | 979f9089199512d32dcc2de1f1e00a96aa9b0bf4 (diff) | |
download | mv-5aca48c5a15041a85af0709cdf1496c61c34b1dd.tar.gz mv-5aca48c5a15041a85af0709cdf1496c61c34b1dd.tar.bz2 mv-5aca48c5a15041a85af0709cdf1496c61c34b1dd.tar.xz mv-5aca48c5a15041a85af0709cdf1496c61c34b1dd.zip |
Rename zip into zipreader.
Diffstat (limited to 'src/fs/virtfs/zip_unittest.cc')
-rw-r--r-- | src/fs/virtfs/zip_unittest.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/fs/virtfs/zip_unittest.cc b/src/fs/virtfs/zip_unittest.cc index ad42f6a4a..3853bee79 100644 --- a/src/fs/virtfs/zip_unittest.cc +++ b/src/fs/virtfs/zip_unittest.cc @@ -26,7 +26,7 @@ #include "fs/virtfs/virtfszip.h" #include "fs/virtfs/virtzipentry.h" -#include "fs/virtfs/zip.h" +#include "fs/virtfs/zipreader.h" #include "fs/virtfs/ziplocalheader.h" #include "utils/delete2.h" @@ -52,7 +52,7 @@ TEST_CASE("Zip readArchiveInfo") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 2); REQUIRE(entry->root == name); REQUIRE(headers[0]->fileName == "dir" + sep + "hide.png"); @@ -73,7 +73,7 @@ TEST_CASE("Zip readArchiveInfo") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 11); REQUIRE(entry->root == name); REQUIRE(headers[0]->fileName == "test.txt"); @@ -135,7 +135,7 @@ TEST_CASE("Zip readArchiveInfo") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 2); REQUIRE(entry->root == name); REQUIRE(headers[0]->fileName == "test.txt"); @@ -156,7 +156,7 @@ TEST_CASE("Zip readArchiveInfo") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(entry->root == name); REQUIRE(headers.size() == 0); @@ -176,7 +176,7 @@ TEST_CASE("Zip readCompressedFile") SECTION("empty") { - REQUIRE_THROWS(VirtFs::Zip::readCompressedFile(nullptr)); + REQUIRE_THROWS(VirtFs::ZipReader::readCompressedFile(nullptr)); } SECTION("test2.zip") @@ -187,11 +187,11 @@ TEST_CASE("Zip readCompressedFile") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 11); REQUIRE(entry->root == name); // test.txt - uint8_t *const buf = VirtFs::Zip::readCompressedFile(headers[0]); + uint8_t *const buf = VirtFs::ZipReader::readCompressedFile(headers[0]); REQUIRE(buf != nullptr); delete [] buf; delete entry; @@ -210,7 +210,7 @@ TEST_CASE("Zip readFile") SECTION("empty") { - REQUIRE_THROWS(VirtFs::Zip::readFile(nullptr)); + REQUIRE_THROWS(VirtFs::ZipReader::readFile(nullptr)); } SECTION("test.zip") @@ -221,7 +221,7 @@ TEST_CASE("Zip readFile") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 2); REQUIRE(entry->root == name); for (int f = 0; f < 2; f ++) @@ -230,7 +230,7 @@ TEST_CASE("Zip readFile") headers[f]->fileName.c_str(), headers[f]->compressSize, headers[f]->uncompressSize); - const uint8_t *const buf = VirtFs::Zip::readFile(headers[f]); + const uint8_t *const buf = VirtFs::ZipReader::readFile(headers[f]); REQUIRE(buf != nullptr); delete [] buf; } @@ -245,11 +245,11 @@ TEST_CASE("Zip readFile") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 11); REQUIRE(entry->root == name); // test.txt - const uint8_t *buf = VirtFs::Zip::readFile(headers[0]); + const uint8_t *buf = VirtFs::ZipReader::readFile(headers[0]); REQUIRE(buf != nullptr); const std::string str = std::string(reinterpret_cast<const char*>(buf), headers[0]->uncompressSize); @@ -261,7 +261,7 @@ TEST_CASE("Zip readFile") headers[f]->fileName.c_str(), headers[f]->compressSize, headers[f]->uncompressSize); - buf = VirtFs::Zip::readFile(headers[f]); + buf = VirtFs::ZipReader::readFile(headers[f]); REQUIRE(buf != nullptr); delete [] buf; } @@ -276,7 +276,7 @@ TEST_CASE("Zip readFile") VirtFs::VirtFsZip::getFuncs()); std::vector<VirtFs::ZipLocalHeader*> &headers = entry->mHeaders; - REQUIRE(VirtFs::Zip::readArchiveInfo(entry)); + REQUIRE(VirtFs::ZipReader::readArchiveInfo(entry)); REQUIRE(headers.size() == 2); REQUIRE(entry->root == name); for (int f = 0; f < 2; f ++) @@ -285,7 +285,7 @@ TEST_CASE("Zip readFile") headers[f]->fileName.c_str(), headers[f]->compressSize, headers[f]->uncompressSize); - const uint8_t *const buf = VirtFs::Zip::readFile(headers[f]); + const uint8_t *const buf = VirtFs::ZipReader::readFile(headers[f]); REQUIRE(buf != nullptr); delete [] buf; } |