diff --git a/tests/ImageSharp.Drawing.Tests/Drawing/DrawingRobustnessTests.cs b/tests/ImageSharp.Drawing.Tests/Drawing/DrawingRobustnessTests.cs index 78fb6eb1..fbc04393 100644 --- a/tests/ImageSharp.Drawing.Tests/Drawing/DrawingRobustnessTests.cs +++ b/tests/ImageSharp.Drawing.Tests/Drawing/DrawingRobustnessTests.cs @@ -160,10 +160,8 @@ public void LargeGeoJson_Mississippi_Lines(TestImageProvider provider, i image.Mutate(c => c.DrawLine(Color.White, 1.0f, loop)); } - // Very strict tolerance, since the image is sparse (relaxed on .NET Framework) - ImageComparer comparer = TestEnvironment.IsFramework - ? ImageComparer.TolerantPercentage(1e-3f) - : ImageComparer.TolerantPercentage(1e-7f); + // Strict comparer, because the image is sparse: + ImageComparer comparer = ImageComparer.TolerantPercentage(0.0001F); string details = $"PixelOffset({pixelOffset})"; image.DebugSave(provider, details, appendPixelTypeToFileName: false, appendSourceFileOrDescription: false); diff --git a/tests/ImageSharp.Drawing.Tests/Drawing/Text/DrawTextOnImageTests.cs b/tests/ImageSharp.Drawing.Tests/Drawing/Text/DrawTextOnImageTests.cs index 96f8dd91..7927565c 100644 --- a/tests/ImageSharp.Drawing.Tests/Drawing/Text/DrawTextOnImageTests.cs +++ b/tests/ImageSharp.Drawing.Tests/Drawing/Text/DrawTextOnImageTests.cs @@ -23,7 +23,7 @@ public class DrawTextOnImageTests private static readonly ImageComparer TextDrawingComparer = ImageComparer.TolerantPercentage(1e-2f); - private static readonly ImageComparer OutlinedTextDrawingComparer = ImageComparer.TolerantPercentage(1e-3f); + private static readonly ImageComparer OutlinedTextDrawingComparer = ImageComparer.TolerantPercentage(0.0069F); public DrawTextOnImageTests(ITestOutputHelper output) => this.Output = output; @@ -278,7 +278,7 @@ public void FontShapesAreRenderedCorrectly_LargeText( } // Strict comparer, because the image is sparse: - var comparer = ImageComparer.TolerantPercentage(1e-6f); + var comparer = ImageComparer.TolerantPercentage(0.0001F); provider.VerifyOperation( comparer,