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