mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code style fixes.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Aaru.Tests.Filesystems
|
||||
[TestFixture]
|
||||
public class Fat32Apm
|
||||
{
|
||||
readonly string[] _testfiles =
|
||||
readonly string[] _testFiles =
|
||||
{
|
||||
"macosx_10.11.aif"
|
||||
};
|
||||
@@ -50,7 +50,7 @@ namespace Aaru.Tests.Filesystems
|
||||
4194304
|
||||
};
|
||||
|
||||
readonly uint[] _sectorsize =
|
||||
readonly uint[] _sectorSize =
|
||||
{
|
||||
512
|
||||
};
|
||||
@@ -60,22 +60,22 @@ namespace Aaru.Tests.Filesystems
|
||||
524278
|
||||
};
|
||||
|
||||
readonly int[] _clustersize =
|
||||
readonly int[] _clusterSize =
|
||||
{
|
||||
4096
|
||||
};
|
||||
|
||||
readonly string[] _volumename =
|
||||
readonly string[] _volumeName =
|
||||
{
|
||||
"VOLUMELABEL"
|
||||
};
|
||||
|
||||
readonly string[] _volumeserial =
|
||||
readonly string[] _volumeSerial =
|
||||
{
|
||||
"35BD1F0A"
|
||||
};
|
||||
|
||||
readonly string[] _oemid =
|
||||
readonly string[] _oemId =
|
||||
{
|
||||
"BSD 4.4"
|
||||
};
|
||||
@@ -83,15 +83,15 @@ namespace Aaru.Tests.Filesystems
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
for(int i = 0; i < _testfiles.Length; i++)
|
||||
for(int i = 0; i < _testFiles.Length; i++)
|
||||
{
|
||||
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "FAT32 (APM)", _testfiles[i]);
|
||||
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "FAT32 (APM)", _testFiles[i]);
|
||||
IFilter filter = new ZZZNoFilter();
|
||||
filter.Open(location);
|
||||
IMediaImage image = new AaruFormat();
|
||||
Assert.AreEqual(true, image.Open(filter), _testfiles[i]);
|
||||
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testfiles[i]);
|
||||
Assert.AreEqual(_sectorsize[i], image.Info.SectorSize, _testfiles[i]);
|
||||
Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
|
||||
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
|
||||
Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, _testFiles[i]);
|
||||
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||
IFilesystem fs = new FAT();
|
||||
int part = -1;
|
||||
@@ -104,15 +104,15 @@ namespace Aaru.Tests.Filesystems
|
||||
break;
|
||||
}
|
||||
|
||||
Assert.AreNotEqual(-1, part, $"Partition not found on {_testfiles[i]}");
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), _testfiles[i]);
|
||||
Assert.AreNotEqual(-1, part, $"Partition not found on {_testFiles[i]}");
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), _testFiles[i]);
|
||||
fs.GetInformation(image, partitions[part], out _, null);
|
||||
Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testfiles[i]);
|
||||
Assert.AreEqual(_clustersize[i], fs.XmlFsType.ClusterSize, _testfiles[i]);
|
||||
Assert.AreEqual("FAT32", fs.XmlFsType.Type, _testfiles[i]);
|
||||
Assert.AreEqual(_volumename[i], fs.XmlFsType.VolumeName, _testfiles[i]);
|
||||
Assert.AreEqual(_volumeserial[i], fs.XmlFsType.VolumeSerial, _testfiles[i]);
|
||||
Assert.AreEqual(_oemid[i], fs.XmlFsType.SystemIdentifier, _testfiles[i]);
|
||||
Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testFiles[i]);
|
||||
Assert.AreEqual(_clusterSize[i], fs.XmlFsType.ClusterSize, _testFiles[i]);
|
||||
Assert.AreEqual("FAT32", fs.XmlFsType.Type, _testFiles[i]);
|
||||
Assert.AreEqual(_volumeName[i], fs.XmlFsType.VolumeName, _testFiles[i]);
|
||||
Assert.AreEqual(_volumeSerial[i], fs.XmlFsType.VolumeSerial, _testFiles[i]);
|
||||
Assert.AreEqual(_oemId[i], fs.XmlFsType.SystemIdentifier, _testFiles[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ namespace Aaru.Tests.Filesystems
|
||||
[TestFixture]
|
||||
public class Fat32Gpt
|
||||
{
|
||||
readonly string[] _testfiles =
|
||||
readonly string[] _testFiles =
|
||||
{
|
||||
"macosx_10.11.aif"
|
||||
};
|
||||
@@ -130,7 +130,7 @@ namespace Aaru.Tests.Filesystems
|
||||
4194304
|
||||
};
|
||||
|
||||
readonly uint[] _sectorsize =
|
||||
readonly uint[] _sectorSize =
|
||||
{
|
||||
512
|
||||
};
|
||||
@@ -140,22 +140,22 @@ namespace Aaru.Tests.Filesystems
|
||||
523775
|
||||
};
|
||||
|
||||
readonly int[] _clustersize =
|
||||
readonly int[] _clusterSize =
|
||||
{
|
||||
4096
|
||||
};
|
||||
|
||||
readonly string[] _volumename =
|
||||
readonly string[] _volumeName =
|
||||
{
|
||||
"VOLUMELABEL"
|
||||
};
|
||||
|
||||
readonly string[] _volumeserial =
|
||||
readonly string[] _volumeSerial =
|
||||
{
|
||||
"7ABE1F1B"
|
||||
};
|
||||
|
||||
readonly string[] _oemid =
|
||||
readonly string[] _oemId =
|
||||
{
|
||||
"BSD 4.4"
|
||||
};
|
||||
@@ -163,15 +163,15 @@ namespace Aaru.Tests.Filesystems
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
for(int i = 0; i < _testfiles.Length; i++)
|
||||
for(int i = 0; i < _testFiles.Length; i++)
|
||||
{
|
||||
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "FAT32 (GPT)", _testfiles[i]);
|
||||
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "FAT32 (GPT)", _testFiles[i]);
|
||||
IFilter filter = new ZZZNoFilter();
|
||||
filter.Open(location);
|
||||
IMediaImage image = new AaruFormat();
|
||||
Assert.AreEqual(true, image.Open(filter), _testfiles[i]);
|
||||
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testfiles[i]);
|
||||
Assert.AreEqual(_sectorsize[i], image.Info.SectorSize, _testfiles[i]);
|
||||
Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
|
||||
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
|
||||
Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, _testFiles[i]);
|
||||
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||
IFilesystem fs = new FAT();
|
||||
int part = -1;
|
||||
@@ -184,15 +184,15 @@ namespace Aaru.Tests.Filesystems
|
||||
break;
|
||||
}
|
||||
|
||||
Assert.AreNotEqual(-1, part, $"Partition not found on {_testfiles[i]}");
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), _testfiles[i]);
|
||||
Assert.AreNotEqual(-1, part, $"Partition not found on {_testFiles[i]}");
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), _testFiles[i]);
|
||||
fs.GetInformation(image, partitions[part], out _, null);
|
||||
Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testfiles[i]);
|
||||
Assert.AreEqual(_clustersize[i], fs.XmlFsType.ClusterSize, _testfiles[i]);
|
||||
Assert.AreEqual("FAT32", fs.XmlFsType.Type, _testfiles[i]);
|
||||
Assert.AreEqual(_volumename[i], fs.XmlFsType.VolumeName, _testfiles[i]);
|
||||
Assert.AreEqual(_volumeserial[i], fs.XmlFsType.VolumeSerial, _testfiles[i]);
|
||||
Assert.AreEqual(_oemid[i], fs.XmlFsType.SystemIdentifier, _testfiles[i]);
|
||||
Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testFiles[i]);
|
||||
Assert.AreEqual(_clusterSize[i], fs.XmlFsType.ClusterSize, _testFiles[i]);
|
||||
Assert.AreEqual("FAT32", fs.XmlFsType.Type, _testFiles[i]);
|
||||
Assert.AreEqual(_volumeName[i], fs.XmlFsType.VolumeName, _testFiles[i]);
|
||||
Assert.AreEqual(_volumeSerial[i], fs.XmlFsType.VolumeSerial, _testFiles[i]);
|
||||
Assert.AreEqual(_oemId[i], fs.XmlFsType.SystemIdentifier, _testFiles[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,7 +200,7 @@ namespace Aaru.Tests.Filesystems
|
||||
[TestFixture]
|
||||
public class Fat32Mbr
|
||||
{
|
||||
readonly string[] _testfiles =
|
||||
readonly string[] _testFiles =
|
||||
{
|
||||
"drdos_7.03.aif", "drdos_8.00.aif", "msdos_7.10.aif", "macosx_10.11.aif", "win10.aif", "win2000.aif",
|
||||
"win95osr2.1.aif", "win95osr2.5.aif", "win95osr2.aif", "win98se.aif", "win98.aif", "winme.aif",
|
||||
@@ -215,7 +215,7 @@ namespace Aaru.Tests.Filesystems
|
||||
4194304, 4194304, 262144, 4194304, 4194304, 4194304, 4194304, 8388608, 1024000, 1024000, 1024000, 1024000
|
||||
};
|
||||
|
||||
readonly uint[] _sectorsize =
|
||||
readonly uint[] _sectorSize =
|
||||
{
|
||||
512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
|
||||
512, 512, 512
|
||||
@@ -227,13 +227,13 @@ namespace Aaru.Tests.Filesystems
|
||||
1048560, 260096, 524160, 524112, 524112, 65514, 1048233, 127744, 127882, 127744, 127744
|
||||
};
|
||||
|
||||
readonly int[] _clustersize =
|
||||
readonly int[] _clusterSize =
|
||||
{
|
||||
4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 2048, 512, 4096, 4096, 4096,
|
||||
32768, 4096, 4096, 4096, 4096, 4096
|
||||
};
|
||||
|
||||
readonly string[] _volumename =
|
||||
readonly string[] _volumeName =
|
||||
{
|
||||
"VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL",
|
||||
"VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL", "VOLUMELABEL",
|
||||
@@ -241,14 +241,14 @@ namespace Aaru.Tests.Filesystems
|
||||
"DICSETTER", "DICSETTER", "DICSETTER"
|
||||
};
|
||||
|
||||
readonly string[] _volumeserial =
|
||||
readonly string[] _volumeSerial =
|
||||
{
|
||||
"5955996C", "1BFB1A43", "3B331809", "42D51EF1", "48073346", "EC62E6DE", "2A310DE4", "0C140DFC", "3E310D18",
|
||||
"0D3D0EED", "0E131162", "3F500F02", "82EB4C04", "00000000", "B488C502", "5CAC9B4E", "41540E0E", "4E600E0F",
|
||||
"26E20E0F", "3E0C1BE8", "63084BBA", "5CC7908D", "D1290612", "79BCA86E"
|
||||
};
|
||||
|
||||
readonly string[] _oemid =
|
||||
readonly string[] _oemId =
|
||||
{
|
||||
"DRDOS7.X", "IBM 7.1", "MSWIN4.1", "BSD 4.4", "MSDOS5.0", "MSDOS5.0", "MSWIN4.1", "MSWIN4.1", "MSWIN4.1",
|
||||
"MSWIN4.1", "MSWIN4.1", "MSWIN4.1", "MSDOS5.0", "BeOS ", "mkfs.fat", "MSWIN4.1", "BSD 4.4", "BSD 4.4",
|
||||
@@ -258,25 +258,25 @@ namespace Aaru.Tests.Filesystems
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
for(int i = 0; i < _testfiles.Length; i++)
|
||||
for(int i = 0; i < _testFiles.Length; i++)
|
||||
{
|
||||
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "FAT32 (MBR)", _testfiles[i]);
|
||||
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "FAT32 (MBR)", _testFiles[i]);
|
||||
IFilter filter = new ZZZNoFilter();
|
||||
filter.Open(location);
|
||||
IMediaImage image = new AaruFormat();
|
||||
Assert.AreEqual(true, image.Open(filter), _testfiles[i]);
|
||||
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testfiles[i]);
|
||||
Assert.AreEqual(_sectorsize[i], image.Info.SectorSize, _testfiles[i]);
|
||||
Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
|
||||
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
|
||||
Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, _testFiles[i]);
|
||||
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||
IFilesystem fs = new FAT();
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[0]), _testfiles[i]);
|
||||
Assert.AreEqual(true, fs.Identify(image, partitions[0]), _testFiles[i]);
|
||||
fs.GetInformation(image, partitions[0], out _, null);
|
||||
Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testfiles[i]);
|
||||
Assert.AreEqual(_clustersize[i], fs.XmlFsType.ClusterSize, _testfiles[i]);
|
||||
Assert.AreEqual("FAT32", fs.XmlFsType.Type, _testfiles[i]);
|
||||
Assert.AreEqual(_volumename[i], fs.XmlFsType.VolumeName, _testfiles[i]);
|
||||
Assert.AreEqual(_volumeserial[i], fs.XmlFsType.VolumeSerial, _testfiles[i]);
|
||||
Assert.AreEqual(_oemid[i], fs.XmlFsType.SystemIdentifier, _testfiles[i]);
|
||||
Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testFiles[i]);
|
||||
Assert.AreEqual(_clusterSize[i], fs.XmlFsType.ClusterSize, _testFiles[i]);
|
||||
Assert.AreEqual("FAT32", fs.XmlFsType.Type, _testFiles[i]);
|
||||
Assert.AreEqual(_volumeName[i], fs.XmlFsType.VolumeName, _testFiles[i]);
|
||||
Assert.AreEqual(_volumeSerial[i], fs.XmlFsType.VolumeSerial, _testFiles[i]);
|
||||
Assert.AreEqual(_oemId[i], fs.XmlFsType.SystemIdentifier, _testFiles[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user