private static void TestEnumReverse() { ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f); ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c); Assert.AreEqual(c.dummy, result); }
private static void Test4ByteHFAReverse() { ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f); ThisCallNative.Width result = ThisCallNative.GetWidthFromManaged(&c); Assert.AreEqual(c.width, result.width); }
private static void Test4ByteNonHFAReverse() { ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f); ThisCallNative.IntWrapper result = ThisCallNative.GetHeightAsIntFromManaged(&c); Assert.AreEqual((int)c.height, result.i); }
private static void TestCLongUnmanagedCallersOnly() { ThisCallNative.C c = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f); CLong result = ThisCallNative.GetWidthAsLongFromManaged(&c); Assert.Equal((nint)c.width, result.Value); }
private static void TestEnumUnmanagedCallersOnly() { ThisCallNative.C c = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f); ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c); Assert.Equal(c.dummy, result); }
private static void Test4ByteHFAUnmanagedCallersOnly() { ThisCallNative.C c = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f); ThisCallNative.Width result = ThisCallNative.GetWidthFromManaged(&c); Assert.Equal(c.width, result.width); }
private static void TestCLongReverse() { ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f); CLong result = ThisCallNative.GetWidthAsLongFromManaged(&c); Assert.AreEqual((nint)c.width, result.Value); }
private static void Test8ByteHFAReverse() { ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f); ThisCallNative.SizeF result = ThisCallNative.GetSizeFromManaged(&c); Assert.AreEqual(c.width, result.width); Assert.AreEqual(c.height, result.height); }