Update for latest nazarautils update

This commit is contained in:
SirLynix
2023-07-17 19:05:15 +02:00
parent af3d1cfa26
commit f2bc1bff7a
30 changed files with 129 additions and 159 deletions

View File

@@ -21,12 +21,6 @@ TEST_CASE("ComputeHash", "[CORE][ALGORITHM]")
const char* expectedOutput;
};
static_assert(Nz::CRC32("Nazara Engine") == 0x8A2F5235);
static_assert(Nz::CRC32("The quick brown fox jumps over the lazy dog") == 0x414FA339);
CHECK(Nz::CRC32("Nazara Engine") == 0x8A2F5235);
CHECK(Nz::CRC32("The quick brown fox jumps over the lazy dog") == 0x414FA339);
// https://defuse.ca/checksums.htm
// https://toolslick.com/programming/hashing/crc-calculator

View File

@@ -208,7 +208,7 @@ TEST_CASE("VirtualDirectory", "[Core][VirtualDirectory]")
const auto& physFileEntry = std::get<Nz::VirtualDirectory::FileEntry>(entry);
Nz::SHA256Hash hash;
Nz::SHA256Hasher hash;
WHEN("We compute " << hash.GetHashName() << " of " << physFileEntry.stream->GetPath() << " file")
{
CHECK(Nz::ToUpper(Nz::ComputeHash(hash, *physFileEntry.stream).ToHex()) == expectedHash);
@@ -221,7 +221,7 @@ TEST_CASE("VirtualDirectory", "[Core][VirtualDirectory]")
{
return dir->GetFileContent(filepath, [&](const void* data, std::size_t size)
{
Nz::SHA256Hash hash;
Nz::SHA256Hasher hash;
WHEN("We compute " << hash.GetHashName() << " of " << filepath << " file")
{
hash.Begin();