From 503ab19d3d4253fb013752572c19c314d19de792 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Sun, 13 Feb 2022 07:40:22 +0100 Subject: SFileAddListFile optimized for protectors that set too large hash table --- test/StormTest.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'test/StormTest.cpp') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index a2db1a6..53d2125 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -4331,7 +4331,7 @@ int _tmain(int argc, TCHAR * argv[]) for(int i = 2; i < argc; i++) { - TestArchive(argv[i], NULL, TFLG_FILE_LOCALE | 0x0409, "staredit\\scenario.chk", NULL); + TestArchive(argv[i], Bliz, TFLG_FILE_LOCALE | 0x0409, "staredit\\scenario.chk", NULL); } // @@ -4344,15 +4344,6 @@ int _tmain(int argc, TCHAR * argv[]) dwErrCode = TestOnLocalListFile(_T("ListFile_Blizzard.txt")); } - // - // Search all testing archives and verify their SHA1 hash - // - - if(dwErrCode == ERROR_SUCCESS) - { - dwErrCode = FindFiles(ForEachFile_VerifyFileChecksum, szMpqSubDir); - } - // // Test file stream operations // @@ -4422,14 +4413,18 @@ int _tmain(int argc, TCHAR * argv[]) } } - // Open the multi-file archive with wrong prefix to see how StormLib deals with it + // Veryfy SHA1 of each MPQ that we have in the list if(dwErrCode == ERROR_SUCCESS) - dwErrCode = TestOpenArchive_WillFail(_T("flat-file://streaming/model.MPQ.0")); + dwErrCode = FindFiles(ForEachFile_VerifyFileChecksum, szMpqSubDir); // Open every MPQ that we have in the storage if(dwErrCode == ERROR_SUCCESS) dwErrCode = FindFiles(ForEachFile_OpenArchive, NULL); + // Open the multi-file archive with wrong prefix to see how StormLib deals with it + if(dwErrCode == ERROR_SUCCESS) + dwErrCode = TestOpenArchive_WillFail(_T("flat-file://streaming/model.MPQ.0")); + // Test on an archive that has been invalidated by extending an old valid MPQ if(dwErrCode == ERROR_SUCCESS) dwErrCode = TestOpenArchive_Corrupt(_T("MPQ_2013_vX_Battle.net.MPQ")); -- cgit v1.2.3