mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Actually assign _entryCount field in BucketTree
This commit is contained in:
parent
49759d3d10
commit
1597f05b27
2 changed files with 9 additions and 0 deletions
|
@ -541,6 +541,7 @@ public partial class BucketTree : IDisposable
|
||||||
_entryStorage.Set(in entryStorage);
|
_entryStorage.Set(in entryStorage);
|
||||||
_nodeSize = nodeSize;
|
_nodeSize = nodeSize;
|
||||||
_entrySize = entrySize;
|
_entrySize = entrySize;
|
||||||
|
_entryCount = entryCount;
|
||||||
_offsetCount = offsetCount;
|
_offsetCount = offsetCount;
|
||||||
_entrySetCount = entrySetCount;
|
_entrySetCount = entrySetCount;
|
||||||
_offsetCache.IsInitialized = true;
|
_offsetCache.IsInitialized = true;
|
||||||
|
|
|
@ -182,4 +182,12 @@ public class BucketTreeTests : IClassFixture<BucketTreeBuffers>
|
||||||
Assert.Equal(expectedEntry.StorageIndex, actualEntry.StorageIndex);
|
Assert.Equal(expectedEntry.StorageIndex, actualEntry.StorageIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Theory, MemberData(nameof(BucketTreeTestTheoryData))]
|
||||||
|
private void GetEntryCount_ReturnsCorrectCount(int treeIndex)
|
||||||
|
{
|
||||||
|
BucketTree tree = _treeData[treeIndex].CreateBucketTree();
|
||||||
|
|
||||||
|
Assert.Equal(_treeData[treeIndex].EntryCount, tree.GetEntryCount());
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue