Added more tests.

This commit is contained in:
2017-07-08 19:24:07 +01:00
parent adf4549371
commit ef10f16d96
64 changed files with 1014 additions and 3596 deletions

View File

@@ -2,7 +2,7 @@
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : AFFS_RDB.cs
// Filename : FAT16_RDB.cs
// Version : 1.0
// Author(s) : Natalia Portillo
//
@@ -35,6 +35,7 @@
// Copyright (C) 2011-2015 Claunia.com
// ****************************************************************************/
// //$Id$
using System;
using System.Collections.Generic;
using System.IO;
using DiscImageChef.CommonTypes;
@@ -48,49 +49,48 @@ using NUnit.Framework;
namespace DiscImageChef.Tests.Filesystems
{
[TestFixture]
public class AFFS_RDB
public class FAT16_RDB
{
readonly string[] testfiles = {
"amigaos_3.9.vdi.lz","amigaos_3.9_intl.vdi.lz","aros.vdi.lz","aros_intl.vdi.lz",
"amigaos_4.0.vdi.lz","amigaos_4.0_intl.vdi.lz","amigaos_4.0_cache.vdi.lz"
"amigaos_3.9.vdi.lz",
};
readonly ulong[] sectors = {
1024128,1024128,409600,409600,
1024128,1024128,1024128,
1024128
};
readonly uint[] sectorsize = {
512,512,512,512,
512,512,512,
512,
};
readonly long[] clusters = {
1020064,1020064,407232,407232,
1020064,1020064,1020064,
1020064
};
readonly int[] clustersize = {
512,512,512,512,
512,512,512,
512,
};
readonly string[] volumename = {
"Volume label","Volume label","Volume label","Volume label",
"Volume label","Volume label","Volume label",
"VOLUMELABEL"
};
readonly string[] volumeserial = {
null,null,null,null,
null,null,null,
"UNKNOWN ",
};
readonly string[] oemid = {
"CDP 5.0",
};
[Test]
public void Test()
{
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
/*
for(int i = 0; i < testfiles.Length; i++)
{
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "affs_rdb", testfiles[i]);
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fat16_rdb", testfiles[i]);
Filter filter = new LZip();
filter.Open(location);
ImagePlugin image = new VDI();
@@ -99,11 +99,11 @@ namespace DiscImageChef.Tests.Filesystems
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
PartPlugin parts = new AmigaRigidDiskBlock();
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
Filesystem fs = new DiscImageChef.Filesystems.FAT();
int part = -1;
for(int j = 0; j < partitions.Count; j++)
{
if(partitions[j].PartitionType == "\"DOS\\1\"" || partitions[j].PartitionType == "\"DOS\\3\"" || partitions[j].PartitionType == "\"DOS\\5\"")
if(partitions[j].PartitionType == "\"RES\\86\"")
{
part = j;
break;
@@ -117,7 +117,8 @@ namespace DiscImageChef.Tests.Filesystems
Assert.AreEqual("Amiga FFS", 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]);
}*/
}
}
}