[Refactor] Use collection expressions.

This commit is contained in:
2024-05-01 04:39:38 +01:00
parent f7ca79b09e
commit 134ce7041e
667 changed files with 12936 additions and 13750 deletions

View File

@@ -41,8 +41,8 @@ public class DiskCopy42 : BlockMediaImageTest
public override IMediaImage Plugin => new Aaru.Images.DiskCopy42();
public override BlockImageTestExpected[] Tests => new[]
{
public override BlockImageTestExpected[] Tests =>
[
new BlockImageTestExpected
{
TestFile = "mf1dd_gcr.dc42.lz",
@@ -50,14 +50,14 @@ public class DiskCopy42 : BlockMediaImageTest
Sectors = 800,
SectorSize = 512,
Md5 = "c5d92544c3e78b7f0a9b4baaa9a64eec",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 800
}
}
]
},
new BlockImageTestExpected
{
@@ -66,14 +66,14 @@ public class DiskCopy42 : BlockMediaImageTest
Sectors = 1440,
SectorSize = 512,
Md5 = "de3f85896f771b7e5bc4c9e3926d64e4",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1440
}
}
]
},
new BlockImageTestExpected
{
@@ -82,14 +82,14 @@ public class DiskCopy42 : BlockMediaImageTest
Sectors = 1600,
SectorSize = 512,
Md5 = "93e71b9ecdb39d3ec9245b4f451856d4",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1600
}
}
]
}
};
];
}

View File

@@ -40,8 +40,8 @@ public class ImageDisk : BlockMediaImageTest
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "ImageDisk");
public override IMediaImage Plugin => new Imd();
public override BlockImageTestExpected[] Tests => new[]
{
public override BlockImageTestExpected[] Tests =>
[
new BlockImageTestExpected
{
TestFile = "md1dd_8.imd.lz",
@@ -89,14 +89,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 1232,
SectorSize = 1024,
Md5 = "fd54916f713d01b670c1a5df5e74a97f",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1232
}
}
]
},
new BlockImageTestExpected
{
@@ -145,14 +145,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 1600,
SectorSize = 512,
Md5 = "c533488a21098a62c85f1649abda2803",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1600
}
}
]
},
new BlockImageTestExpected
{
@@ -161,14 +161,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 1640,
SectorSize = 512,
Md5 = "db9cfb6eea18820b7a7e0b5b45594471",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1640
}
}
]
},
new BlockImageTestExpected
{
@@ -177,14 +177,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 1640,
SectorSize = 512,
Md5 = "456390a9c6ab05cb458a03c47296de08",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1640
}
}
]
},
new BlockImageTestExpected
{
@@ -201,14 +201,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 1440,
SectorSize = 512,
Md5 = "de3f85896f771b7e5bc4c9e3926d64e4",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1440
}
}
]
},
new BlockImageTestExpected
{
@@ -233,14 +233,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 3372,
SectorSize = 512,
Md5 = "7f9164dc43bffc895db751ba1d9b55a9",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 3372
}
}
]
},
new BlockImageTestExpected
{
@@ -257,14 +257,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 3486,
SectorSize = 512,
Md5 = "dbd52e9e684f97d9e2292811242bb24e",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 3486
}
}
]
},
new BlockImageTestExpected
{
@@ -299,14 +299,14 @@ public class ImageDisk : BlockMediaImageTest
Sectors = 800,
SectorSize = 512,
Md5 = "ccd4431139755c58f340681f63510642",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 800
}
}
]
}
};
];
}

View File

@@ -39,8 +39,8 @@ public class TeleDisk : BlockMediaImageTest
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "TeleDisk");
public override IMediaImage Plugin => new Aaru.Images.TeleDisk();
public override BlockImageTestExpected[] Tests => new[]
{
public override BlockImageTestExpected[] Tests =>
[
new BlockImageTestExpected
{
TestFile = "md1dd_8.td0.lz",
@@ -80,14 +80,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 1232,
SectorSize = 1024,
Md5 = "fd54916f713d01b670c1a5df5e74a97f",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1232
}
}
]
},
new BlockImageTestExpected
{
@@ -136,14 +136,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 1600,
SectorSize = 512,
Md5 = "c533488a21098a62c85f1649abda2803",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1600
}
}
]
},
new BlockImageTestExpected
{
@@ -152,14 +152,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 1640,
SectorSize = 512,
Md5 = "db9cfb6eea18820b7a7e0b5b45594471",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1640
}
}
]
},
new BlockImageTestExpected
{
@@ -168,14 +168,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 1640,
SectorSize = 512,
Md5 = "456390a9c6ab05cb458a03c47296de08",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1640
}
}
]
},
new BlockImageTestExpected
{
@@ -184,14 +184,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 1440,
SectorSize = 512,
Md5 = "de3f85896f771b7e5bc4c9e3926d64e4",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1440
}
}
]
},
new BlockImageTestExpected
{
@@ -224,14 +224,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 332,
SectorSize = 512,
Md5 = "323ea79c83432663669b9bc29f13785c",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 332
}
}
]
},
new BlockImageTestExpected
{
@@ -248,14 +248,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 3486,
SectorSize = 512,
Md5 = "dbd52e9e684f97d9e2292811242bb24e",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 3486
}
}
]
},
new BlockImageTestExpected
{
@@ -307,14 +307,14 @@ public class TeleDisk : BlockMediaImageTest
Sectors = 800,
SectorSize = 512,
Md5 = "ccd4431139755c58f340681f63510642",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 800
}
}
]
}
};
];
}

View File

@@ -42,8 +42,8 @@ public class XDF : BlockMediaImageTest
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "XDF");
public override IMediaImage Plugin => new ZZZRawImage();
public override BlockImageTestExpected[] Tests => new[]
{
public override BlockImageTestExpected[] Tests =>
[
new BlockImageTestExpected
{
TestFile = "mf2hd_xdf_teledisk.xdf.lz",
@@ -60,5 +60,5 @@ public class XDF : BlockMediaImageTest
SectorSize = 512,
Md5 = "825ca9cdcb2f35ff8bbbda9cb0a27c4d"
}
};
];
}

View File

@@ -40,8 +40,8 @@ public class Raw : BlockMediaImageTest
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "raw");
public override IMediaImage Plugin => new ZZZRawImage();
public override BlockImageTestExpected[] Tests => new[]
{
public override BlockImageTestExpected[] Tests =>
[
new BlockImageTestExpected
{
TestFile = "md1dd_8.img.lz",
@@ -89,14 +89,14 @@ public class Raw : BlockMediaImageTest
Sectors = 1232,
SectorSize = 1024,
Md5 = "fd54916f713d01b670c1a5df5e74a97f",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1232
}
}
]
},
new BlockImageTestExpected
{
@@ -145,14 +145,14 @@ public class Raw : BlockMediaImageTest
Sectors = 1600,
SectorSize = 512,
Md5 = "c533488a21098a62c85f1649abda2803",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1600
}
}
]
},
new BlockImageTestExpected
{
@@ -161,14 +161,14 @@ public class Raw : BlockMediaImageTest
Sectors = 1640,
SectorSize = 512,
Md5 = "db9cfb6eea18820b7a7e0b5b45594471",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1640
}
}
]
},
new BlockImageTestExpected
{
@@ -177,14 +177,14 @@ public class Raw : BlockMediaImageTest
Sectors = 1640,
SectorSize = 512,
Md5 = "456390a9c6ab05cb458a03c47296de08",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1640
}
}
]
},
new BlockImageTestExpected
{
@@ -201,14 +201,14 @@ public class Raw : BlockMediaImageTest
Sectors = 1440,
SectorSize = 512,
Md5 = "de3f85896f771b7e5bc4c9e3926d64e4",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 1440
}
}
]
},
new BlockImageTestExpected
{
@@ -241,14 +241,14 @@ public class Raw : BlockMediaImageTest
Sectors = 3372,
SectorSize = 512,
Md5 = "7f9164dc43bffc895db751ba1d9b55a9",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 3372
}
}
]
},
new BlockImageTestExpected
{
@@ -265,14 +265,14 @@ public class Raw : BlockMediaImageTest
Sectors = 3486,
SectorSize = 512,
Md5 = "dbd52e9e684f97d9e2292811242bb24e",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 3486
}
}
]
},
new BlockImageTestExpected
{
@@ -324,14 +324,14 @@ public class Raw : BlockMediaImageTest
Sectors = 800,
SectorSize = 512,
Md5 = "ccd4431139755c58f340681f63510642",
Partitions = new[]
{
Partitions =
[
new BlockPartitionVolumes
{
Start = 0,
Length = 800
}
}
]
}
};
];
}