diff --git a/tests/LibHac.Tests/Fs/AesXtsFileSystemTests.cs b/tests/LibHac.Tests/Fs/AesXtsFileSystemTests.cs new file mode 100644 index 00000000..9d02ba09 --- /dev/null +++ b/tests/LibHac.Tests/Fs/AesXtsFileSystemTests.cs @@ -0,0 +1,19 @@ +using LibHac.Fs; +using LibHac.FsSystem; +using LibHac.Tests.Fs.IFileSystemTestBase; + +namespace LibHac.Tests.Fs +{ + public class AesXtsFileSystemTests : IFileSystemTests + { + protected override IFileSystem CreateFileSystem() + { + var baseFs = new InMemoryFileSystem(); + + var keys = new byte[0x20]; + var xtsFs = new AesXtsFileSystem(baseFs, keys, 0x4000); + + return xtsFs; + } + } +} diff --git a/tests/LibHac.Tests/Fs/SubdirectoryFileSystemTests.cs b/tests/LibHac.Tests/Fs/SubdirectoryFileSystemTests.cs new file mode 100644 index 00000000..e033e095 --- /dev/null +++ b/tests/LibHac.Tests/Fs/SubdirectoryFileSystemTests.cs @@ -0,0 +1,34 @@ +using System.Diagnostics; +using LibHac.Fs; +using LibHac.FsSystem; +using LibHac.Tests.Fs.IFileSystemTestBase; + +namespace LibHac.Tests.Fs +{ + public class SubdirectoryFileSystemTests : IFileSystemTests + { + protected override IFileSystem CreateFileSystem() + { + Trace.Listeners.Clear(); + var baseFs = new InMemoryFileSystem(); + baseFs.CreateDirectory("/sub"); + baseFs.CreateDirectory("/sub/path"); + + var subFs = new SubdirectoryFileSystem(baseFs, "/sub/path"); + + return subFs; + } + } + public class SubdirectoryFileSystemTestsRoot : IFileSystemTests + { + protected override IFileSystem CreateFileSystem() + { + Trace.Listeners.Clear(); + var baseFs = new InMemoryFileSystem(); + + var subFs = new SubdirectoryFileSystem(baseFs, "/"); + + return subFs; + } + } +}