Skip to content

Commit d775ded

Browse files
committed
Allow small difference when writing the file.
1 parent 8068d80 commit d775ded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Magick.NET.Tests/Optimizers/ImageOptimizerTestHelper{TOptimizer}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ protected void AssertCompressNotSmaller(string fileName)
2929
var lengthB = AssertCompressNotSmaller(fileName, (string file) => Optimizer.Compress(file));
3030
var lengthC = AssertCompressNotSmaller(fileName, (Stream stream) => Optimizer.Compress(stream));
3131

32-
Assert.Equal(lengthA, lengthB);
33-
Assert.Equal(lengthB, lengthC);
32+
Assert.InRange(lengthA, lengthB - 1, lengthB + 1);
33+
Assert.InRange(lengthB, lengthC - 1, lengthC + 1);
3434
}
3535

3636
protected void AssertCompressTwice(string fileName)

0 commit comments

Comments
 (0)