mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
cleanup
This commit is contained in:
parent
3b283627ee
commit
aa68d8e976
@ -156,7 +156,8 @@ void CompressTest::createDataFile(const std::string& path, Poco::UInt64 size)
|
||||
|
||||
void CompressTest::testZip64()
|
||||
{
|
||||
typedef std::map<std::string, Poco::UInt64> FileMap;
|
||||
using FileMap = std::map<std::string, Poco::UInt64>;
|
||||
|
||||
std::cout << std::endl;
|
||||
FileMap files;
|
||||
files["data1.bin"] = static_cast<Poco::UInt64>(KB)*4096+1;
|
||||
|
@ -131,9 +131,9 @@ void ZipTest::testCrcAndSizeAfterData()
|
||||
Poco::FileInputStream inp(testFile);
|
||||
assertTrue (inp.good());
|
||||
Decompress dec(inp, Poco::Path::temp());
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
dec.decompressAllFiles();
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
assertTrue (_errCnt == 0);
|
||||
assertTrue (!dec.mapping().empty());
|
||||
}
|
||||
@ -192,9 +192,9 @@ void ZipTest::testDecompress()
|
||||
Poco::FileInputStream inp(testFile);
|
||||
assertTrue (inp.good());
|
||||
Decompress dec(inp, Poco::Path::temp());
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
dec.decompressAllFiles();
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
assertTrue (_errCnt == 0);
|
||||
assertTrue (!dec.mapping().empty());
|
||||
}
|
||||
@ -206,9 +206,9 @@ void ZipTest::testDecompressFlat()
|
||||
Poco::FileInputStream inp(testFile);
|
||||
assertTrue (inp.good());
|
||||
Decompress dec(inp, Poco::Path::temp(), true);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
dec.decompressAllFiles();
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
assertTrue (_errCnt == 0);
|
||||
assertTrue (!dec.mapping().empty());
|
||||
}
|
||||
@ -220,9 +220,9 @@ void ZipTest::testDecompressVuln()
|
||||
Poco::FileInputStream inp(testFile);
|
||||
assertTrue (inp.good());
|
||||
Decompress dec(inp, Poco::Path::temp());
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
dec.decompressAllFiles();
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
assertTrue (_errCnt == 1);
|
||||
assertTrue (dec.mapping().empty());
|
||||
}
|
||||
@ -234,9 +234,9 @@ void ZipTest::testDecompressFlatVuln()
|
||||
Poco::FileInputStream inp(testFile);
|
||||
assertTrue (inp.good());
|
||||
Decompress dec(inp, Poco::Path::temp(), true);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
dec.decompressAllFiles();
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
|
||||
dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>>(this, &ZipTest::onDecompressError);
|
||||
assertTrue (_errCnt == 0);
|
||||
assertTrue (!dec.mapping().empty());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user