From 1298e09a93d63493a6712913ff76d1c7e37c3cc1 Mon Sep 17 00:00:00 2001 From: Mitchell Hwang Date: Fri, 10 Jul 2020 13:02:40 -0400 Subject: [PATCH 1/3] [wasm] Modify OffsetOf_Decimal_ReturnsExpected for Browser --- .../System/Runtime/InteropServices/Marshal/OffsetOfTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs index df8381a578e149..5ed3fd5313c629 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs @@ -109,7 +109,7 @@ public void OffsetOf_Decimal_ReturnsExpected() { Type t = typeof(FieldAlignmentTest_Decimal); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || (RuntimeInformation.ProcessArchitecture != Architecture.X86)) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || (RuntimeInformation.ProcessArchitecture != Architecture.X86 && RuntimeInformation.ProcessArchitecture != Architecture.Wasm)) { Assert.Equal(96, Marshal.SizeOf(t)); } @@ -121,7 +121,7 @@ public void OffsetOf_Decimal_ReturnsExpected() Assert.Equal(new IntPtr(0), Marshal.OffsetOf(t, nameof(FieldAlignmentTest_Decimal.b))); Assert.Equal(new IntPtr(8), Marshal.OffsetOf(t, nameof(FieldAlignmentTest_Decimal.p))); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || (RuntimeInformation.ProcessArchitecture != Architecture.X86)) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || (RuntimeInformation.ProcessArchitecture != Architecture.X86 && RuntimeInformation.ProcessArchitecture != Architecture.Wasm)) { Assert.Equal(new IntPtr(88), Marshal.OffsetOf(t, nameof(FieldAlignmentTest_Decimal.s))); } From b39da63d19b4ffea9d77895e82f99cf4f0d32350 Mon Sep 17 00:00:00 2001 From: Mitchell Hwang Date: Mon, 13 Jul 2020 08:56:02 -0400 Subject: [PATCH 2/3] [wasm] Add ActiveIssues for GetDelegateForFunctionPointerTests and GetFunctionPointerForDelegateTests --- .../Marshal/GetDelegateForFunctionPointerTests.cs | 1 + .../Marshal/GetFunctionPointerForDelegateTests.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs index c04d683d45b575..6f12389d33fc4b 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs @@ -10,6 +10,7 @@ namespace System.Runtime.InteropServices.Tests { + [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public class GetDelegateForFunctionPointerTests { [Theory] diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs index 70204afc8897ae..c9e7cd925e6b6c 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs @@ -23,6 +23,7 @@ public void GetFunctionPointerForDelegate_NormalDelegateNonGeneric_ReturnsExpect } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public void GetFunctionPointerForDelegate_MarshalledDelegateNonGeneric_ReturnsExpected() { MethodInfo targetMethod = typeof(GetFunctionPointerForDelegateTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static); @@ -51,6 +52,7 @@ public void GetFunctionPointerForDelegate_NormalDelegateGeneric_ReturnsExpected( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public void GetFunctionPointerForDelegate_MarshalledDelegateGeneric_ReturnsExpected() { MethodInfo targetMethod = typeof(GetFunctionPointerForDelegateTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static); From b810afcec75d17c62bcb5bcbf1cf951b3c30e3a0 Mon Sep 17 00:00:00 2001 From: Mitchell Hwang Date: Mon, 13 Jul 2020 10:18:45 -0400 Subject: [PATCH 3/3] [libraries] Remove System.Runtime.InteropServices project exclusion --- src/libraries/tests.proj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 29a5714bb80372..63e6bae497a5ac 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -66,7 +66,6 @@ -