Skip to content

Commit

Permalink
Updated unit tests due to changes in the limits of ImageMagick.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Sep 17, 2023
1 parent 9dfb741 commit a114004
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions tests/Magick.NET.Tests/ResourceLimitsTests/TheHeightProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ public class TheHeightProperty
[Fact]
public void ShouldHaveTheCorrectValue()
{
if (Runtime.Is64Bit)
{
Assert.Equal(1844674407370955161U / sizeof(QuantumType), ResourceLimits.Height);
}
else
{
Assert.Equal(429496729U / sizeof(QuantumType), ResourceLimits.Height);
}
var memoryLimit = Runtime.Is64Bit ? (ulong)long.MaxValue : int.MaxValue;
var maxChannels = 64UL;

Assert.Equal(memoryLimit / sizeof(QuantumType) / maxChannels, ResourceLimits.Height);
}

[Fact]
Expand Down
12 changes: 4 additions & 8 deletions tests/Magick.NET.Tests/ResourceLimitsTests/TheWidthProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ public class TheWidthProperty
[Fact]
public void ShouldHaveTheCorrectValue()
{
if (Runtime.Is64Bit)
{
Assert.Equal(1844674407370955161U / sizeof(QuantumType), ResourceLimits.Width);
}
else
{
Assert.Equal(429496729U / sizeof(QuantumType), ResourceLimits.Width);
}
var memoryLimit = Runtime.Is64Bit ? (ulong)long.MaxValue : int.MaxValue;
var maxChannels = 64UL;

Assert.Equal(memoryLimit / sizeof(QuantumType) / maxChannels, ResourceLimits.Width);
}

[Fact]
Expand Down

0 comments on commit a114004

Please sign in to comment.