From 0b19ec2dd1598b0af0b9d0401590ed4aef64ad6b Mon Sep 17 00:00:00 2001 From: Emik Date: Fri, 10 Nov 2023 16:36:32 +0100 Subject: [PATCH] Updated test `Runtime.InteropServices.Pointer` is expected to return true now because the following code compiles: ```cs Test>(); // OK void Test() where T : unmanaged { } ``` --- src/DotNext.Tests/Reflection/TypeExtensionsTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DotNext.Tests/Reflection/TypeExtensionsTests.cs b/src/DotNext.Tests/Reflection/TypeExtensionsTests.cs index 318276ac8..fd5a399d0 100644 --- a/src/DotNext.Tests/Reflection/TypeExtensionsTests.cs +++ b/src/DotNext.Tests/Reflection/TypeExtensionsTests.cs @@ -58,8 +58,10 @@ public static void IsUnmanaged() True(typeof(bool).IsUnmanaged()); True(typeof(Guid).IsUnmanaged()); True(typeof(DateTime).IsUnmanaged()); - False(typeof(Runtime.InteropServices.Pointer).IsUnmanaged()); + True(typeof((int, int)).IsUnmanaged()); + True(typeof(Runtime.InteropServices.Pointer).IsUnmanaged()); False(typeof(ManagedStruct).IsUnmanaged()); + False(typeof((int, string)).IsUnmanaged()); var method = new Func(SizeOf).Method; method = method.GetGenericMethodDefinition(); True(method.GetGenericArguments()[0].IsUnmanaged());