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

@@ -285,7 +285,7 @@ namespace Aaru.Tests.Images.DiskImagesFramework.NDIF
}
// How many sectors to read at once
const uint _sectorsToRead = 256;
const uint SECTORS_TO_READ = 256;
[Test]
public void Hashes()
@@ -310,10 +310,10 @@ namespace Aaru.Tests.Images.DiskImagesFramework.NDIF
{
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
{

View File

@@ -285,7 +285,7 @@ namespace Aaru.Tests.Images.DiskImagesFramework.NDIF
}
// How many sectors to read at once
const uint _sectorsToRead = 256;
const uint SECTORS_TO_READ = 256;
[Test]
public void Hashes()
@@ -310,10 +310,10 @@ namespace Aaru.Tests.Images.DiskImagesFramework.NDIF
{
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
{

View File

@@ -285,7 +285,7 @@ namespace Aaru.Tests.Images.DiskImagesFramework.NDIF
}
// How many sectors to read at once
const uint _sectorsToRead = 256;
const uint SECTORS_TO_READ = 256;
[Test]
public void Hashes()
@@ -310,10 +310,10 @@ namespace Aaru.Tests.Images.DiskImagesFramework.NDIF
{
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
{