Skip to content

Commit

Permalink
(Re)enable some SysV pinvoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbotsch committed Dec 16, 2022
1 parent 19b0648 commit 9ed90b8
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public struct S20
public long z;
public long w;
}
/* These tests are not working on non Windows CoreCLR. Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved.

[StructLayout(LayoutKind.Sequential)]
public struct S28
{
Expand All @@ -184,7 +184,7 @@ public struct S29
public int x;
public object y;
}
Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved. */

public struct S30
{
public long x;
Expand All @@ -211,11 +211,8 @@ public struct S30
public delegate void MyCallback18(S18 s);
public delegate void MyCallback19(S19 s);
public delegate void MyCallback20(S20 s);

/* These tests are not working on non Windows CoreCLR. Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved.
public delegate void MyCallback28(S28 s);
public delegate void MyCallback29(S29 s);
Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved. */
public delegate void MyCallback30(S30 s1, S30 s2, S30 s3);

[DllImport("jitstructtests_lib")]
Expand Down Expand Up @@ -277,14 +274,13 @@ public struct S30

[DllImport("jitstructtests_lib")]
public static extern void InvokeCallback20(MyCallback20 callback, S20 s);
/* These tests are not working on non Windows CoreCLR. Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved.

[DllImport("jitstructtests_lib")]
public static extern void InvokeCallback28(MyCallback28 callback, S28 s);

[DllImport("jitstructtests_lib")]
public static extern void InvokeCallback29(MyCallback29 callback, S29 s);
Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved. */

[DllImport("jitstructtests_lib")]
public static extern void InvokeCallback30(MyCallback30 callback, S30 s1, S30 s2, S30 s3);

Expand Down Expand Up @@ -347,14 +343,13 @@ public struct S30

[DllImport("jitstructtests_lib")]
public static extern S20 InvokeCallback20R(MyCallback20 callback, S20 s);
/* These tests are not working on non Windows CoreCLR. Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved.

[DllImport("jitstructtests_lib")]
public static extern S28 InvokeCallback28R(MyCallback28 callback, S28 s);

[DllImport("jitstructtests_lib")]
public static extern S29 InvokeCallback29R(MyCallback29 callback, S29 s);
Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved. */

static public int Main1()
{
Program3 p = new Program3();
Expand Down Expand Up @@ -641,7 +636,6 @@ static public int Main1()
}
}, s20);

/* These tests are not working on non Windows CoreCLR. Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved.
TestClass testClass = new TestClass();
S28 s28;
s28.x = null;
Expand Down Expand Up @@ -688,7 +682,7 @@ static public int Main1()
throw new System.Exception();
}
}, s29);
Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved. */

S30 s30;
s30.x = 1;
s30.y = 2;
Expand All @@ -701,7 +695,6 @@ static public int Main1()
s30_3.x = 5;
s30_3.y = 6;

// Program p = new Program();
InvokeCallback30(p.Test30, s30, s30_2, s30_3);
S1 s1r = InvokeCallback1R((par) =>
{
Expand Down Expand Up @@ -989,7 +982,7 @@ static public int Main1()
{
throw new System.Exception();
}
/* These tests are not working on non Windows CoreCLR. Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved.

s28.x = null;
S28 s28r = InvokeCallback28R((par) => {
Console.WriteLine("S28: {0}, {1}", par.x == null ? "Null" : "Not null", par.y);
Expand Down Expand Up @@ -1048,7 +1041,6 @@ static public int Main1()
{
throw new System.Exception();
}
Enable this when https://github.com/dotnet/runtime/issues/4680 is resolved. */
}
catch (Exception e)
{
Expand Down

0 comments on commit 9ed90b8

Please sign in to comment.