public static void StructWithDefaultNonBlittableFields_DoesNotMarshal() { short s = 42; bool b = true; Assert.True(DisabledRuntimeMarshallingNative.GetStructWithShortAndBoolCallback()(new StructWithShortAndBool(s, b), s, b)); }
public static void StructWithDefaultNonBlittableFields() { short s = 42; bool b = true; var callback = Marshal.GetDelegateForFunctionPointer <CheckStructWithShortAndBoolCallback>((IntPtr)DisabledRuntimeMarshallingNative.GetStructWithShortAndBoolCallback()); Assert.False(callback(new StructWithShortAndBool(s, b), s, b)); }