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()
168
168
[ InlineData ( ErrorMetric . MeanSquared , 0.2233 ) ]
169
169
[ InlineData ( ErrorMetric . NormalizedCrossCorrelation , 0.0682 ) ]
170
170
[ InlineData ( ErrorMetric . PeakAbsolute , 1 ) ]
171
- [ InlineData ( ErrorMetric . PeakSignalToNoiseRatio , 0.1441 ) ]
171
+ [ InlineData ( ErrorMetric . PeakSignalToNoiseRatio , - 0.1351 ) ]
172
172
[ InlineData ( ErrorMetric . PerceptualHash , 0 ) ]
173
173
[ InlineData ( ErrorMetric . RootMeanSquared , 0.4726 ) ]
174
174
[ InlineData ( ErrorMetric . StructuralSimilarity , 0.4220 ) ]
@@ -181,7 +181,10 @@ public void ShouldReturnTheCorrectValueForEachErrorMetric(ErrorMetric errorMetri
181
181
using var other = image . CloneAndMutate ( image => image . Rotate ( 180 ) ) ;
182
182
183
183
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 ) ;
185
188
}
186
189
}
187
190
}
You can’t perform that action at this time.
0 commit comments