Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,4 @@ artifacts/
# Tests
**/Images/ActualOutput
**/Images/ReferenceOutput
.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public class ResizeTests
nameof(KnownResamplers.Lanczos5),
};

private static readonly ImageComparer ValidatorComparer = ImageComparer.TolerantPercentage(0.07F);
private static readonly ImageComparer ValidatorComparer =
ImageComparer.TolerantPercentage(TestEnvironment.IsOSX && TestEnvironment.RunsOnCI ? 0.26F : 0.07F);

[Fact]
public void Resize_PixelAgnostic()
Expand Down Expand Up @@ -355,7 +356,6 @@ public void Resize_WorksWithAllResamplers<TPixel>(
}

[Theory]
[PlatformSpecific(~TestPlatforms.OSX)]
[WithFileCollection(nameof(CommonTestImages), DefaultPixelType)]
public void ResizeFromSourceRectangle<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
Expand Down Expand Up @@ -438,7 +438,6 @@ public void ResizeWidthCannotKeepAspectKeepsOnePixel<TPixel>(TestImageProvider<T
}

[Theory]
[PlatformSpecific(~TestPlatforms.OSX)]
[WithFileCollection(nameof(CommonTestImages), DefaultPixelType)]
public void ResizeWithBoxPadMode<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
Expand Down Expand Up @@ -549,7 +548,6 @@ public void ResizeWithMinMode<TPixel>(TestImageProvider<TPixel> provider)
}

[Theory]
[PlatformSpecific(~TestPlatforms.OSX)]
[WithFileCollection(nameof(CommonTestImages), DefaultPixelType)]
public void ResizeWithPadMode<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
Expand Down
2 changes: 2 additions & 0 deletions tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ internal static string GetReferenceOutputFileName(string actualOutputFileName) =

internal static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);

internal static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);

internal static bool IsMono => Type.GetType("Mono.Runtime") != null; // https://stackoverflow.com/a/721194

internal static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
Expand Down