Use same algorithm for all media image unit tests.

This commit is contained in:
2021-02-28 06:11:52 +00:00
parent c701e7c763
commit c616c5667e
102 changed files with 2599 additions and 1922 deletions

View File

@@ -168,7 +168,7 @@ namespace Aaru.Tests.Images.VirtualBox
}
// How many sectors to read at once
const uint _sectorsToRead = 256;
const uint SECTORS_TO_READ = 256;
[Test]
public void Hashes()
@@ -197,10 +197,10 @@ namespace Aaru.Tests.Images.VirtualBox
{
byte[] sector;
if(image.Info.Sectors - doneSectors >= _sectorsToRead)
if(image.Info.Sectors - doneSectors >= SECTORS_TO_READ)
{
sector = image.ReadSectors(doneSectors, _sectorsToRead);
doneSectors += _sectorsToRead;
sector = image.ReadSectors(doneSectors, SECTORS_TO_READ);
doneSectors += SECTORS_TO_READ;
}
else
{