Skip to content

Commit

Permalink
Unit test #1 (fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Mar 16, 2024
1 parent bcbaa49 commit 68efbdb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Tests/RstbLibrary.Tests/OperationsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,18 @@ public void ValidateWriteRestbl()
restbl.HashTable.Count.Should().Be(379715);
restbl.OverflowTable.Count.Should().Be(32);
}

[Fact]
public void ValidateWriteEmptyOverflowRestbl()
{
Rstb restbl = Rstb.FromBinary(Assets.RestblData);
restbl.OverflowTable.Clear();
byte[] restblData = restbl.ToBinary(Endianness.Little, RstbVersion.Dynamic);

restbl = Rstb.FromBinary(restblData);
restbl.Version.Should().Be(RstbVersion.Dynamic);
restbl.Endianness.Should().Be(Endianness.Little);
restbl.HashTable.Count.Should().Be(379715);
restbl.OverflowTable.Count.Should().Be(0);
}
}

0 comments on commit 68efbdb

Please sign in to comment.