Skip to content

Commit

Permalink
Tweak tolerance for ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBobSquarePants committed Sep 8, 2023
1 parent 1fb4acf commit d15be1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,8 @@ public void LargeGeoJson_Mississippi_Lines(TestImageProvider<Rgba32> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -278,7 +278,7 @@ public void FontShapesAreRenderedCorrectly_LargeText<TPixel>(
}

// Strict comparer, because the image is sparse:
var comparer = ImageComparer.TolerantPercentage(1e-6f);
var comparer = ImageComparer.TolerantPercentage(0.0001F);

provider.VerifyOperation(
comparer,
Expand Down

0 comments on commit d15be1c

Please sign in to comment.