Skip to content

Commit

Permalink
Disable failing graphics tests on windows 7 (dotnet/runtime#71151)
Browse files Browse the repository at this point in the history
* Disable failing graphics tests on windows 7

Related: https://github.com/dotnet/runtime/issues/51097. Disables the failing tests on Windows 7 as well.

Commit migrated from dotnet/runtime@879f201
  • Loading branch information
ViktorHofer committed Jun 29, 2022
1 parent b81ce86 commit 4d6bfdc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/System.Drawing.Common/tests/GraphicsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace System.Drawing.Tests
{
public partial class GraphicsTests
{
public static bool IsWindows7OrWindowsArm64 => PlatformDetection.IsWindows7 || (PlatformDetection.IsWindows && PlatformDetection.IsArm64Process);

[ConditionalFact(Helpers.IsDrawingSupported)]
public void GetHdc_FromHdc_Roundtrips()
{
Expand Down Expand Up @@ -93,7 +95,7 @@ public static IEnumerable<object[]> FromHdc_TestData()
yield return new object[] { Helpers.GetDC(foregroundWindow) };
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(PlatformDetection), nameof(PlatformDetection.IsArm64Process), nameof(PlatformDetection.IsWindows10OrLater))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(GraphicsTests), nameof(IsWindows7OrWindowsArm64))]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(FromHdc_TestData))]
public void FromHdc_ValidHdc_ReturnsExpected(IntPtr hdc)
Expand All @@ -105,7 +107,7 @@ public void FromHdc_ValidHdc_ReturnsExpected(IntPtr hdc)
}
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(PlatformDetection), nameof(PlatformDetection.IsArm64Process), nameof(PlatformDetection.IsWindows10OrLater))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(GraphicsTests), nameof(IsWindows7OrWindowsArm64))]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(FromHdc_TestData))]
public void FromHdc_ValidHdcWithContext_ReturnsExpected(IntPtr hdc)
Expand All @@ -117,7 +119,7 @@ public void FromHdc_ValidHdcWithContext_ReturnsExpected(IntPtr hdc)
}
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(PlatformDetection), nameof(PlatformDetection.IsArm64Process), nameof(PlatformDetection.IsWindows10OrLater))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(GraphicsTests), nameof(IsWindows7OrWindowsArm64))]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(FromHdc_TestData))]
public void FromHdcInternal_GetDC_ReturnsExpected(IntPtr hdc)
Expand Down Expand Up @@ -245,7 +247,7 @@ public static IEnumerable<object[]> Hwnd_TestData()
yield return new object[] { Helpers.GetForegroundWindow() };
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(PlatformDetection), nameof(PlatformDetection.IsArm64Process), nameof(PlatformDetection.IsWindows10OrLater))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(GraphicsTests), nameof(IsWindows7OrWindowsArm64))]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(Hwnd_TestData))]
public void FromHwnd_ValidHwnd_ReturnsExpected(IntPtr hWnd)
Expand All @@ -257,7 +259,7 @@ public void FromHwnd_ValidHwnd_ReturnsExpected(IntPtr hWnd)
}
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(PlatformDetection), nameof(PlatformDetection.IsArm64Process), nameof(PlatformDetection.IsWindows10OrLater))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51097", typeof(GraphicsTests), nameof(IsWindows7OrWindowsArm64))]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(Hwnd_TestData))]
public void FromHwndInternal_ValidHwnd_ReturnsExpected(IntPtr hWnd)
Expand Down

0 comments on commit 4d6bfdc

Please sign in to comment.