Author: massi
Date: 2007-02-19 06:51:14 -0500 (Mon, 19 Feb 2007)
New Revision: 73108

Added:
   trunk/mono/mono/tests/iface7.cs
Modified:
   trunk/mono/mono/tests/ChangeLog
   trunk/mono/mono/tests/Makefile.am
Log:
        * iface7.cs, Makefile.am: Added test for bug 75903.



Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog     2007-02-19 11:49:51 UTC (rev 73107)
+++ trunk/mono/mono/tests/ChangeLog     2007-02-19 11:51:14 UTC (rev 73108)
@@ -1,3 +1,6 @@
+2007-02-19  Massimiliano Mantione  <[EMAIL PROTECTED]>
+       * iface7.cs, Makefile.am: Added test for bug 75903.
+
 2007-02-08  Jonathan Chambers  <[EMAIL PROTECTED]>
 
        * libtest.c: Add tests for COM Callable Wrapper marshalling.

Modified: trunk/mono/mono/tests/Makefile.am
===================================================================
--- trunk/mono/mono/tests/Makefile.am   2007-02-19 11:49:51 UTC (rev 73107)
+++ trunk/mono/mono/tests/Makefile.am   2007-02-19 11:51:14 UTC (rev 73108)
@@ -107,6 +107,7 @@
        vtype.cs                \
        isvaluetype.cs          \
        iface6.cs               \
+       iface7.cs               \
        ipaddress.cs            \
        array-vt.cs             \
        interface1.cs           \

Added: trunk/mono/mono/tests/iface7.cs
===================================================================
--- trunk/mono/mono/tests/iface7.cs     2007-02-19 11:49:51 UTC (rev 73107)
+++ trunk/mono/mono/tests/iface7.cs     2007-02-19 11:51:14 UTC (rev 73108)
@@ -0,0 +1,43 @@
+using System;
+
+namespace TestMono
+{
+       public interface IBase {
+               int Do();
+       }
+
+       public interface IDerived : IBase {
+       }
+
+       public class Base : IBase {
+               int IBase.Do() {
+                       return 1 + Do();
+               }
+               public virtual int Do() {
+                       return 1;
+               }
+       }
+
+       public class Derived : Base, IDerived {
+       }
+
+       class Class1
+       {
+               static int Main(string[] args)
+               {
+                       IDerived id = new Derived();
+                       if (id.Do() != 2)
+                               return 1;
+                       IBase ib = (IBase) id;
+                       if (ib.Do() != 2)
+                               return 2;
+                       Derived d = (Derived) id;
+                       if (d.Do() != 1)
+                               return 3;
+                       Base b = (Base) id;
+                       if (b.Do() != 1)
+                               return 4;
+                       return 0;
+               }
+       }
+}

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

Reply via email to