Skip to content

Commit

Permalink
Add failing (and skipped) test to repro #292
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Jun 1, 2022
1 parent 6a02786 commit dc86f22
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/GenerationSandbox.Tests/BasicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,22 @@ public void ZeroOrMinusOneIsInvalidSafeHandle()
h = new(new IntPtr(-1), ownsHandle: false);
Assert.True(h.IsInvalid);
}

/// <summary>
/// Verifies that structs with explicit field placement where managed and unmanaged values overlap do not cause a TypeLoadException.
/// </summary>
/// <remarks>
/// This demonstrates the problem tracked by <see href="https://github.com/microsoft/CsWin32/issues/292">this bug</see>.
/// </remarks>
[Fact(Skip = "Failure tracked by #292")]
public void LoadProblematicTypes()
{
Windows.Win32.System.Com.VARDESC d = new()
{
Anonymous =
{
oInst = 3,
},
};
}
}
1 change: 1 addition & 0 deletions test/GenerationSandbox.Tests/NativeMethods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PathParseIconLocation
RegLoadAppKey
RM_PROCESS_INFO
ShellLink
VARDESC
WER_REPORT_INFORMATION
wglGetProcAddress
WPARAM
Expand Down

0 comments on commit dc86f22

Please sign in to comment.