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 TestEnumUnmanagedCallersOnly() { ThisCallNative.C c = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f); ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c); Assert.Equal(c.dummy, result); }
private static void TestEnum(ThisCallNative.C *instance) { ThisCallNative.GetEFn callback = Marshal.GetDelegateForFunctionPointer <ThisCallNative.GetEFn>(instance->vtable->getE); ThisCallNative.E result = callback(instance); Assert.AreEqual(instance->dummy, result); }