Skip to content

Commit 4856ea8

Browse files
committed
Updated unit tests due to changes in ImageMagick.
1 parent 82d768c commit 4856ea8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Magick.NET.Tests/MagickImageTests/TheCompareMethod.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void ShouldUseTheColorFuzz()
169169
[InlineData(ErrorMetric.PerceptualHash, 0)]
170170
[InlineData(ErrorMetric.RootMeanSquared, 0.3653)]
171171
[InlineData(ErrorMetric.StructuralSimilarity, 0.1546)]
172-
[InlineData(ErrorMetric.StructuralDissimilarity, 0.4226)]
172+
[InlineData(ErrorMetric.StructuralDissimilarity, 0.1546)]
173173
public void ShouldReturnTheCorrectValueForEachErrorMetric(ErrorMetric errorMetric, double expectedResult)
174174
{
175175
using var image = new MagickImage(Files.Builtin.Logo);
@@ -193,7 +193,7 @@ public void ShouldReturnTheCorrectValueForEachErrorMetric(ErrorMetric errorMetri
193193
[InlineData(ErrorMetric.PerceptualHash, 0)]
194194
[InlineData(ErrorMetric.RootMeanSquared, 0.4726)]
195195
[InlineData(ErrorMetric.StructuralSimilarity, 0.2889)]
196-
[InlineData(ErrorMetric.StructuralDissimilarity, 0.3555)]
196+
[InlineData(ErrorMetric.StructuralDissimilarity, 0.2889)]
197197
public void ShouldReturnTheCorrectValueForEachErrorMetricForImageWithAlphaChannel(ErrorMetric errorMetric, double expectedResult, double? expectedArm64Result = null)
198198
{
199199
using var image = new MagickImage(Files.MagickNETIconPNG);
@@ -213,7 +213,7 @@ public void ShouldReturnTheCorrectValueForPhaseCorrelationErrorMetric()
213213
using var other = image.CloneAndMutate(image => image.Rotate(180));
214214

215215
var result = image.Compare(other, ErrorMetric.PhaseCorrelation);
216-
Assert.InRange(result, 0.3225, 0.3226);
216+
Assert.InRange(result, 0.3387, 0.3388);
217217
}
218218

219219
[Fact]
@@ -227,7 +227,7 @@ public void ShouldReturnTheCorrectValueForPhaseCorrelationErrorMetricWithAlphaCh
227227
using var other = image.CloneAndMutate(image => image.Rotate(180));
228228

229229
var result = image.Compare(other, ErrorMetric.PhaseCorrelation);
230-
Assert.InRange(result, -0.0250, -0.0249);
230+
Assert.InRange(result, 0.5124, 0.5125);
231231
}
232232
}
233233
}

0 commit comments

Comments
 (0)