Beispiel #1
0
 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);
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
        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);
        }