Skip to content

Commit

Permalink
Skip unstable test DataGridView_OnColumnHeadersHeightChanged_InvokeWi…
Browse files Browse the repository at this point in the history
…thHandle_CallsColumnHeadersHeightChanged (dotnet#11323)

* Skip unstable test DataGridView_OnColumnHeadersHeightChanged_InvokeWithHandle_CallsColumnHeadersHeightChanged

* Add judgement RuntimeInformation.ProcessArchitecture == Architecture.X86

* Update DataGridViewTests.cs to add a space
  • Loading branch information
LeafShi1 authored May 11, 2024
1 parent 27d748e commit 9f8f671
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Runtime.InteropServices;

namespace System.Windows.Forms.Tests;

Expand Down Expand Up @@ -1900,12 +1901,20 @@ public static IEnumerable<object[]> OnColumnHeadersHeightChanged_TestData()
{
foreach (bool columnHeadersVisible in new bool[] { true, false })
{
// Skip verification of DataGridViewColumnHeadersHeightSizeMode = DisableResizing and columnHeadersVisible = true
// in X86 due to the active issue "https://github.com/dotnet/winforms/issues/11322"
if (columnHeadersWidthSizeMode == DataGridViewColumnHeadersHeightSizeMode.DisableResizing
&& columnHeadersVisible is true
&& RuntimeInformation.ProcessArchitecture == Architecture.X86)
continue;

yield return new object[] { columnHeadersWidthSizeMode, columnHeadersVisible, null };
yield return new object[] { columnHeadersWidthSizeMode, columnHeadersVisible, new EventArgs() };
}
}
}

[ActiveIssue("https://github.com/dotnet/winforms/issues/11322")]
[WinFormsTheory]
[MemberData(nameof(OnColumnHeadersHeightChanged_TestData))]
public void DataGridView_OnColumnHeadersHeightChanged_Invoke_CallsColumnHeadersHeightChanged(DataGridViewColumnHeadersHeightSizeMode columnHeadersWidthSizeMode, bool columnHeadersVisible, EventArgs eventArgs)
Expand Down

0 comments on commit 9f8f671

Please sign in to comment.