Author: zoltan
Date: 2005-03-04 11:30:49 -0500 (Fri, 04 Mar 2005)
New Revision: 41450

Modified:
   trunk/mono/mono/tests/ChangeLog
   trunk/mono/mono/tests/remoting1.cs
Log:
2005-03-04  Zoltan Varga  <[EMAIL PROTECTED]>

        * remoting1.cs: Add new regression test.


Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog     2005-03-04 16:18:53 UTC (rev 41449)
+++ trunk/mono/mono/tests/ChangeLog     2005-03-04 16:30:49 UTC (rev 41450)
@@ -1,3 +1,7 @@
+2005-03-04  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * remoting1.cs: Add new regression test.
+
 2005-03-01  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * pinvoke3.cs: Add tests for passing blittable arrays.

Modified: trunk/mono/mono/tests/remoting1.cs
===================================================================
--- trunk/mono/mono/tests/remoting1.cs  2005-03-04 16:18:53 UTC (rev 41449)
+++ trunk/mono/mono/tests/remoting1.cs  2005-03-04 16:30:49 UTC (rev 41450)
@@ -58,6 +58,20 @@
        }
 }
 
+public class EmptyProxy : RealProxy
+{
+       public EmptyProxy ( Type type ) : base( type ) 
+       { 
+       }
+
+       public override IMessage Invoke( IMessage msg )
+       {
+               IMethodCallMessage call = (IMethodCallMessage)msg;
+
+               return new ReturnMessage( null, null, 0, null, call );
+       }
+}
+
 public struct MyStruct {
        public int a;
        public int b;
@@ -90,6 +104,10 @@
        }
 }
 
+class R3 : MarshalByRefObject {
+       public object anObject;
+}
+
 class Test {
 
        delegate MyStruct RemoteDelegate1 (int a, out int c, int b);
@@ -179,6 +197,13 @@
                if (!(real_proxy.GetTransparentProxy () is R2))
                        return 14;
 
+               /* Test what happens if the proxy doesn't return the required 
information */
+               EmptyProxy handler = new EmptyProxy ( typeof (R3) );
+               R3 o3 = (R3)handler.GetTransparentProxy();
+
+               if (o3.anObject != null)
+                       return 15;
+
                return 0;
        }
 }

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

Reply via email to