Editorconfig cleanup

This commit is contained in:
Matt Nadareski
2026-04-15 08:44:42 -04:00
parent dab850103b
commit 5694cdf9a9
5 changed files with 63 additions and 69 deletions

View File

@@ -221,7 +221,7 @@ namespace SabreTools.Serialization.Readers
obj.DirectoryRecords = [.. records];
// Previously set padding assumed to be all 0xFF up to sector boundaries
// Previously set padding assumed to be all 0xFF up to sector boundaries
int remainder = Constants.SectorSize - (int)(size % Constants.SectorSize);
if (remainder > 0 && remainder < Constants.SectorSize)
obj.Padding = data.ReadBytes(remainder);

View File

@@ -1,4 +1,3 @@
using System.IO;
using Xunit;
namespace SabreTools.Serialization.Writers.Test

View File

@@ -2,9 +2,6 @@ using System;
using System.IO;
using System.Text;
using SabreTools.Data.Models.XDVDFS;
using SabreTools.IO;
using SabreTools.IO.Extensions;
using SabreTools.Numerics;
using SabreTools.Numerics.Extensions;
namespace SabreTools.Serialization.Writers
@@ -20,7 +17,7 @@ namespace SabreTools.Serialization.Writers
if (string.IsNullOrEmpty(path))
return false;
if(obj is null || !ValidateVolume(obj))
if (obj is null || !ValidateVolume(obj))
return false;
// Create the file stream

View File

@@ -1,60 +1,60 @@
using System.IO;
using System.Linq;
using Xunit;
namespace SabreTools.Wrappers.Test
{
public class XDVDFSTests
{
[Fact]
public void NullArray_Null()
{
byte[]? data = null;
int offset = 0;
var actual = XDVDFS.Create(data, offset);
Assert.Null(actual);
}
[Fact]
public void EmptyArray_Null()
{
byte[]? data = [];
int offset = 0;
var actual = XDVDFS.Create(data, offset);
Assert.Null(actual);
}
[Fact]
public void InvalidArray_Null()
{
byte[]? data = [.. Enumerable.Repeat<byte>(0xFF, 1024)];
int offset = 0;
var actual = XDVDFS.Create(data, offset);
Assert.Null(actual);
}
[Fact]
public void NullStream_Null()
{
Stream? data = null;
var actual = XDVDFS.Create(data);
Assert.Null(actual);
}
[Fact]
public void EmptyStream_Null()
{
Stream? data = new MemoryStream([]);
var actual = XDVDFS.Create(data);
Assert.Null(actual);
}
[Fact]
public void InvalidStream_Null()
{
Stream? data = new MemoryStream([.. Enumerable.Repeat<byte>(0xFF, 1024)]);
var actual = XDVDFS.Create(data);
Assert.Null(actual);
}
}
}
using System.IO;
using System.Linq;
using Xunit;
namespace SabreTools.Wrappers.Test
{
public class XDVDFSTests
{
[Fact]
public void NullArray_Null()
{
byte[]? data = null;
int offset = 0;
var actual = XDVDFS.Create(data, offset);
Assert.Null(actual);
}
[Fact]
public void EmptyArray_Null()
{
byte[]? data = [];
int offset = 0;
var actual = XDVDFS.Create(data, offset);
Assert.Null(actual);
}
[Fact]
public void InvalidArray_Null()
{
byte[]? data = [.. Enumerable.Repeat<byte>(0xFF, 1024)];
int offset = 0;
var actual = XDVDFS.Create(data, offset);
Assert.Null(actual);
}
[Fact]
public void NullStream_Null()
{
Stream? data = null;
var actual = XDVDFS.Create(data);
Assert.Null(actual);
}
[Fact]
public void EmptyStream_Null()
{
Stream? data = new MemoryStream([]);
var actual = XDVDFS.Create(data);
Assert.Null(actual);
}
[Fact]
public void InvalidStream_Null()
{
Stream? data = new MemoryStream([.. Enumerable.Repeat<byte>(0xFF, 1024)]);
var actual = XDVDFS.Create(data);
Assert.Null(actual);
}
}
}

View File

@@ -1,7 +1,5 @@
using System;
using System.IO;
using SabreTools.Data.Models.XDVDFS;
using SabreTools.Numerics.Extensions;
namespace SabreTools.Wrappers
{
@@ -17,7 +15,7 @@ namespace SabreTools.Wrappers
outputFilename += ".xiso";
string outputPath = Path.Combine(outputDirectory, outputFilename);
var writer = new SabreTools.Serialization.Writers.XDVDFS();
var writer = new Serialization.Writers.XDVDFS();
if (!writer.SerializeFile(Model, outputPath))
{
if (includeDebug) Console.WriteLine("Model was invalid, cannot write!");