mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -39,31 +39,159 @@ namespace DiscImageChef.Tests.Partitions
|
||||
[TestFixture]
|
||||
public class VTOC
|
||||
{
|
||||
readonly string[] testfiles = {
|
||||
"att_unix_vtoc.vdi.lz",
|
||||
};
|
||||
readonly string[] testfiles = {"att_unix_vtoc.vdi.lz",};
|
||||
|
||||
readonly Partition[][] wanted = {
|
||||
readonly Partition[][] wanted =
|
||||
{
|
||||
// AT&T UNIX System V Release 4 Version 2.1 for 386
|
||||
new []{
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: Boot", Length = 34, Sequence = 0, Start = 1 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: Whole disk", Length = 1023119, Sequence = 1, Start = 1 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: Stand", Length = 253, Sequence = 2, Start = 63 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 3, Start = 378 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 4, Start = 79002 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 5, Start = 157626 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 6, Start = 236250 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 7, Start = 314874 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 8, Start = 393498 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 9, Start = 472122 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 10, Start = 550746 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, Sequence = 11, Start = 629370 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 76608, Sequence = 12, Start = 707994 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 77616, Sequence = 13, Start = 784602 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 75600, Sequence = 14, Start = 862218 },
|
||||
new Partition{ Description = null, Name = null, Type = "UNIX: /usr", Length = 84672, Sequence = 15, Start = 937818 },
|
||||
new[]
|
||||
{
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: Boot",
|
||||
Length = 34,
|
||||
Sequence = 0,
|
||||
Start = 1
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: Whole disk",
|
||||
Length = 1023119,
|
||||
Sequence = 1,
|
||||
Start = 1
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: Stand",
|
||||
Length = 253,
|
||||
Sequence = 2,
|
||||
Start = 63
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 3,
|
||||
Start = 378
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 4,
|
||||
Start = 79002
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 5,
|
||||
Start = 157626
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 6,
|
||||
Start = 236250
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 7,
|
||||
Start = 314874
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 8,
|
||||
Start = 393498
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 9,
|
||||
Start = 472122
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 10,
|
||||
Start = 550746
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 78624,
|
||||
Sequence = 11,
|
||||
Start = 629370
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 76608,
|
||||
Sequence = 12,
|
||||
Start = 707994
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 77616,
|
||||
Sequence = 13,
|
||||
Start = 784602
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 75600,
|
||||
Sequence = 14,
|
||||
Start = 862218
|
||||
},
|
||||
new Partition
|
||||
{
|
||||
Description = null,
|
||||
Name = null,
|
||||
Type = "UNIX: /usr",
|
||||
Length = 84672,
|
||||
Sequence = 15,
|
||||
Start = 937818
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
[Test]
|
||||
public void Test()
|
||||
@@ -82,7 +210,7 @@ namespace DiscImageChef.Tests.Partitions
|
||||
// Too chatty
|
||||
//Assert.AreEqual(wanted[i][j].PartitionDescription, partitions[j].PartitionDescription, testfiles[i]);
|
||||
Assert.AreEqual(wanted[i][j].Length * 512, partitions[j].Size, testfiles[i]);
|
||||
// Assert.AreEqual(wanted[i][j].Name, partitions[j].Name, testfiles[i]);
|
||||
// Assert.AreEqual(wanted[i][j].Name, partitions[j].Name, testfiles[i]);
|
||||
Assert.AreEqual(wanted[i][j].Type, partitions[j].Type, testfiles[i]);
|
||||
Assert.AreEqual(wanted[i][j].Start * 512, partitions[j].Offset, testfiles[i]);
|
||||
Assert.AreEqual(wanted[i][j].Length, partitions[j].Length, testfiles[i]);
|
||||
@@ -92,4 +220,4 @@ namespace DiscImageChef.Tests.Partitions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user