-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
63 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
ME3Tweaks.Wwiser.Tests/HierarchyTests/RandSeqContainerTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using ME3Tweaks.Wwiser.Model.Hierarchy; | ||
using ME3Tweaks.Wwiser.Model.Hierarchy.Enums; | ||
|
||
namespace ME3Tweaks.Wwiser.Tests.HierarchyTests; | ||
|
||
public class RandSeqContainerTests | ||
{ | ||
|
||
[TestCase("RandSeqContainer_V56.bin", 56)] | ||
public void RandSeqContainer_Reserializes(string filename, int version) | ||
{ | ||
var data = TestData.GetTestDataBytes(@"Hierarchy",@"RandSeqContainer", filename); | ||
var (_, result) = TestHelpers.Deserialize<RandSeqContainer>(data, version); | ||
|
||
var reserialized = TestHelpers.Serialize(result, version); | ||
Assert.That(reserialized, Is.EqualTo(data)); | ||
} | ||
} |
Binary file added
BIN
+29 Bytes
ME3Tweaks.Wwiser.Tests/TestData/Hierarchy/BankSourceData/BSDV56_3.bin
Binary file not shown.
Binary file added
BIN
+9.62 KB
ME3Tweaks.Wwiser.Tests/TestData/Hierarchy/LargeFullChunks/HIRC_V56.bin
Binary file not shown.
Binary file added
BIN
+180 Bytes
ME3Tweaks.Wwiser.Tests/TestData/Hierarchy/RandSeqContainer/RandSeqContainer_V56.bin
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using BinarySerialization; | ||
|
||
namespace ME3Tweaks.Wwiser.Model.Hierarchy; | ||
|
||
public class EmptyHircItem : HircItem | ||
{ | ||
[FieldOrder(0)] | ||
[FieldLength(nameof(HircItemContainer.Size), AncestorType = typeof(HircItemContainer), | ||
RelativeSourceMode = RelativeSourceMode.FindAncestor)] | ||
public byte[] Data { get; set; } = Array.Empty<byte>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters