Skip to content

Commit

Permalink
SecureMemoryTests.cs: Fix a different test on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-lucas6 committed Dec 8, 2024
1 parent b684510 commit a51a979
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Geralt.Tests/SecureMemoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
[TestClass]
public class SecureMemoryTests
{
// With DataRow(), the associated test fails on macOS
public static IEnumerable<object[]> InvalidGuardedHeapAllocationSizes()
{
yield return [0];
yield return [SecureMemory.PageSize];
yield return [GuardedHeapAllocation.MaxSize + 1];
}

[TestMethod]
public void Constants_Valid()
{
Expand Down Expand Up @@ -156,9 +164,7 @@ public void GuardedHeapAllocation_Tampered()
}*/

[TestMethod]
[DataRow(0)]
[DataRow(4096)]
[DataRow(4096 - 15)]
[DynamicData(nameof(InvalidGuardedHeapAllocationSizes), DynamicDataSourceType.Method)]
public void GuardedHeapAllocation_Invalid(int size)
{
// This is the only exception that can be tested
Expand Down

0 comments on commit a51a979

Please sign in to comment.