File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
tests/Magick.NET.Tests/MagickImageTests Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ public void ShouldUseTheColorFuzz()
168168 [ InlineData ( ErrorMetric . MeanSquared , 0.2233 ) ]
169169 [ InlineData ( ErrorMetric . NormalizedCrossCorrelation , 0.0682 ) ]
170170 [ InlineData ( ErrorMetric . PeakAbsolute , 1 ) ]
171- [ InlineData ( ErrorMetric . PeakSignalToNoiseRatio , 0.1441 ) ]
171+ [ InlineData ( ErrorMetric . PeakSignalToNoiseRatio , - 0.1351 ) ]
172172 [ InlineData ( ErrorMetric . PerceptualHash , 0 ) ]
173173 [ InlineData ( ErrorMetric . RootMeanSquared , 0.4726 ) ]
174174 [ InlineData ( ErrorMetric . StructuralSimilarity , 0.4220 ) ]
@@ -181,7 +181,10 @@ public void ShouldReturnTheCorrectValueForEachErrorMetric(ErrorMetric errorMetri
181181 using var other = image . CloneAndMutate ( image => image . Rotate ( 180 ) ) ;
182182
183183 var result = image . Compare ( other , errorMetric ) ;
184- Assert . InRange ( result , expectedResult , expectedResult + 0.0001 ) ;
184+ if ( expectedResult < 0 )
185+ Assert . InRange ( result , expectedResult - 0.0001 , expectedResult ) ;
186+ else
187+ Assert . InRange ( result , expectedResult , expectedResult + 0.0001 ) ;
185188 }
186189 }
187190}
You can’t perform that action at this time.
0 commit comments