1 Commits

Author SHA1 Message Date
stdranges
30af98df8c Update SegmentedPoolTests.cs
fix: updated test comments
2025-11-24 20:30:49 +00:00
2 changed files with 4 additions and 27 deletions

View File

@@ -1,23 +0,0 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on: push
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore UnmangedMMU/UnmanagedMMU.sln
- name: Build
run: dotnet build UnmangedMMU/UnmanagedMMU.sln --no-restore
- name: Unit Testing
run: dotnet test UnmangedMMU/UnmanagedMMU.sln --no-build --verbosity normal

View File

@@ -481,7 +481,7 @@ namespace UnmanagedMMUTests
public void TrimWhenFreeSegmentCountLessThanMinSegmentsDoesNothing() public void TrimWhenFreeSegmentCountLessThanMinSegmentsDoesNothing()
{ {
nuint segmentSize = 1024; nuint segmentSize = 1024; // 1 KiB for the test
int initialSegments = 32; int initialSegments = 32;
SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments); SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments);
@@ -505,7 +505,7 @@ namespace UnmanagedMMUTests
public void TrimWhenFreeSegmentGreaterThanMinSegmentsTrimsFreeSegmentsToNewSize() public void TrimWhenFreeSegmentGreaterThanMinSegmentsTrimsFreeSegmentsToNewSize()
{ {
nuint segmentSize = 1024; nuint segmentSize = 1024; // 1 KiB for the test
int initialSegments = 32; int initialSegments = 32;
SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments); SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments);
@@ -553,7 +553,7 @@ namespace UnmanagedMMUTests
[Fact] [Fact]
public void ResetNoTrimClearsAllActivateSegments() public void ResetNoTrimClearsAllActivateSegments()
{ {
nuint segmentSize = 300; // 1 KiB for the test nuint segmentSize = 300; // 300 bytes for the test
int initialSegments = 8; int initialSegments = 8;
SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments); SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments);
@@ -596,7 +596,7 @@ namespace UnmanagedMMUTests
[Fact] [Fact]
public void ResetWithTrimClearsAllActivateSegments() public void ResetWithTrimClearsAllActivateSegments()
{ {
nuint segmentSize = 300; // 1 KiB for the test nuint segmentSize = 300; // 300 bytes for the test
int initialSegments = 64; int initialSegments = 64;
SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments); SegmentedPool pool = new SegmentedPool(segmentSize, initialSegments);