mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use same algorithm for all media image unit tests.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user