public void VARIANT_Dispose_InvokeDefault_Success(ushort vt) { using var variant = new VARIANT { vt = (VARENUM)vt }; variant.Dispose(); Assert.Equal(VARENUM.EMPTY, variant.vt); Assert.Equal(IntPtr.Zero, variant.data1); Assert.Equal(IntPtr.Zero, variant.data2); }
public void VARIANT_Dispose_InvokeCustom_Success() { using var variant = new VARIANT { vt = VARENUM.BOOL, data1 = (IntPtr) 1 }; variant.Dispose(); Assert.Equal(VARENUM.EMPTY, variant.vt); Assert.Equal(IntPtr.Zero, variant.data1); Assert.Equal(IntPtr.Zero, variant.data2); }
public void VARIANT_Dispose_InvokeBSTR_Success() { IntPtr data = Marshal.StringToBSTR("abc"); using var variant = new VARIANT { vt = VARENUM.BSTR, data1 = data }; variant.Dispose(); Assert.Equal(VARENUM.EMPTY, variant.vt); Assert.Equal(IntPtr.Zero, variant.data1); Assert.Equal(IntPtr.Zero, variant.data2); }