Author: joncham
Date: 2006-10-20 13:34:07 -0400 (Fri, 20 Oct 2006)
New Revision: 66840

Modified:
   trunk/mono/mono/tests/ChangeLog
   trunk/mono/mono/tests/cominterop.cs
   trunk/mono/mono/tests/libtest.c
Log:
2006-10-20  Jonathan Chambers  <[EMAIL PROTECTED]>

        * cominterop.cs: Added more tests for Variant.
        * libtest.c: Added more tests for Variant.

Signed-off-by: Jonathan Chambers <[EMAIL PROTECTED]>


Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog     2006-10-20 17:32:51 UTC (rev 66839)
+++ trunk/mono/mono/tests/ChangeLog     2006-10-20 17:34:07 UTC (rev 66840)
@@ -1,3 +1,8 @@
+2006-10-20  Jonathan Chambers  <[EMAIL PROTECTED]>
+
+       * cominterop.cs: Added more tests for Variant.
+       * libtest.c: Added more tests for Variant.
+       
 2006-10-02  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * static-constructor.cs: Add a new test.

Modified: trunk/mono/mono/tests/cominterop.cs
===================================================================
--- trunk/mono/mono/tests/cominterop.cs 2006-10-20 17:32:51 UTC (rev 66839)
+++ trunk/mono/mono/tests/cominterop.cs 2006-10-20 17:34:07 UTC (rev 66840)
@@ -54,8 +54,14 @@
        public static extern int 
mono_test_marshal_variant_in_double([MarshalAs(UnmanagedType.Struct)]object 
obj);
 
        [DllImport("libtest")]
-       public static extern int 
mono_test_marshal_variant_in_bstr([MarshalAs(UnmanagedType.Struct)]object obj);
+       public static extern int mono_test_marshal_variant_in_bstr ([MarshalAs 
(UnmanagedType.Struct)]object obj);
 
+       [DllImport ("libtest")]
+       public static extern int mono_test_marshal_variant_in_bool_true 
([MarshalAs (UnmanagedType.Struct)]object obj);
+
+       [DllImport ("libtest")]
+       public static extern int mono_test_marshal_variant_in_bool_false 
([MarshalAs (UnmanagedType.Struct)]object obj);
+
        [DllImport("libtest")]
        public static extern int 
mono_test_marshal_variant_out_sbyte([MarshalAs(UnmanagedType.Struct)]out object 
obj);
 
@@ -87,16 +93,22 @@
        public static extern int 
mono_test_marshal_variant_out_double([MarshalAs(UnmanagedType.Struct)]out 
object obj);
 
        [DllImport("libtest")]
-       public static extern int 
mono_test_marshal_variant_out_bstr([MarshalAs(UnmanagedType.Struct)]out object 
obj);
+       public static extern int mono_test_marshal_variant_out_bstr ([MarshalAs 
(UnmanagedType.Struct)]out object obj);
 
+       [DllImport("libtest")]
+       public static extern int mono_test_marshal_variant_out_bool_true 
([MarshalAs (UnmanagedType.Struct)]out object obj);
+
+       [DllImport ("libtest")]
+       public static extern int mono_test_marshal_variant_out_bool_false 
([MarshalAs (UnmanagedType.Struct)]out object obj);
+
     [DllImport ("libtest")]
     public static extern int mono_test_marshal_com_object_create (out IntPtr 
pUnk);
 
     [DllImport ("libtest")]
     public static extern int mono_test_marshal_com_object_destroy (IntPtr 
pUnk);
 
-    [DllImport ("libtest")]
-    public static extern int mono_test_marshal_com_object_ref_count (IntPtr 
pUnk);
+       [DllImport ("libtest")]
+       public static extern int mono_test_marshal_com_object_ref_count (IntPtr 
pUnk);
 
        public static int Main() {
 

Modified: trunk/mono/mono/tests/libtest.c
===================================================================
--- trunk/mono/mono/tests/libtest.c     2006-10-20 17:32:51 UTC (rev 66839)
+++ trunk/mono/mono/tests/libtest.c     2006-10-20 17:34:07 UTC (rev 66840)
@@ -2013,6 +2013,22 @@
 }
 
 STDCALL int
+mono_test_marshal_variant_in_bool_true (VARIANT variant)
+{
+       if (variant.vt == VT_BOOL && variant.ullVal == VARIANT_TRUE)
+               return 0;
+       return 1;
+}
+
+STDCALL int
+mono_test_marshal_variant_in_bool_false (VARIANT variant)
+{
+       if (variant.vt == VT_BOOL && variant.ullVal == VARIANT_FALSE)
+               return 0;
+       return 1;
+}
+
+STDCALL int
 mono_test_marshal_variant_out_sbyte(VARIANT* variant)
 {
        variant->vt = VT_I1;
@@ -2111,6 +2127,24 @@
        return 0;
 }
 
+STDCALL int
+mono_test_marshal_variant_out_bool_true (VARIANT* variant)
+{
+       variant->vt = VT_BOOL;
+       variant->bstrVal = VARIANT_TRUE;
+
+       return 0;
+}
+
+STDCALL int
+mono_test_marshal_variant_out_bool_false (VARIANT* variant)
+{
+       variant->vt = VT_BOOL;
+       variant->bstrVal = VARIANT_FALSE;
+
+       return 0;
+}
+
 #ifdef _MSC_VER
 #define COM_STDCALL __stdcall
 #else

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to