Added more tests.

This commit is contained in:
2017-07-05 06:55:25 +01:00
parent ec7b077327
commit dab93a2bad
40 changed files with 1125 additions and 3131 deletions

View File

@@ -2,7 +2,7 @@
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : btrfs.cs
// Filename : F2FS.cs
// Version : 1.0
// Author(s) : Natalia Portillo
//
@@ -48,7 +48,7 @@ using NUnit.Framework;
namespace DiscImageChef.Tests.Filesystems
{
[TestFixture]
public class btrfs
public class F2FS
{
readonly string[] testfiles = {
"linux.vdi.lz",
@@ -75,7 +75,7 @@ namespace DiscImageChef.Tests.Filesystems
};
readonly string[] volumeserial = {
"a4fc5201-85cc-6840-8a68-998cab9ae897",
"81bd3a4e-de0c-484c-becc-aaa479b2070a",
};
[Test]
@@ -83,7 +83,7 @@ namespace DiscImageChef.Tests.Filesystems
{
for(int i = 0; i < testfiles.Length; i++)
{
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "btrfs", testfiles[i]);
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "f2fs", testfiles[i]);
Filter filter = new LZip();
filter.Open(location);
ImagePlugin image = new VDI();
@@ -92,7 +92,7 @@ namespace DiscImageChef.Tests.Filesystems
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
PartPlugin parts = new MBR();
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
Filesystem fs = new DiscImageChef.Filesystems.BTRFS();
Filesystem fs = new DiscImageChef.Filesystems.F2FS();
int part = -1;
for(int j = 0; j < partitions.Count; j++)
{
@@ -107,7 +107,7 @@ namespace DiscImageChef.Tests.Filesystems
fs.GetInformation(image, partitions[part].PartitionStartSector, partitions[part].PartitionStartSector + partitions[part].PartitionSectors - 1, out string information);
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
Assert.AreEqual("B-tree file system", fs.XmlFSType.Type, testfiles[i]);
Assert.AreEqual("F2FS filesystem", fs.XmlFSType.Type, testfiles[i]);
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
}