* X11Structs.cs: Add a few ToString() overrides.
[mono.git] / mono / tests / iface2.cs
index d0a3783ee73727e001ffdd36959b77f5272d4d91..cc86c35705106e399747dbcaa13b42d4ce19d804 100644 (file)
@@ -1,6 +1,8 @@
 interface IA
 {
        int Add(int i);
+
+       int Add2(int i);
 }
 
 interface IB
@@ -8,28 +10,57 @@ interface IB
        int Add(int i); 
 }
 
-interface IC : IA, IB {}
+interface IC
+{
+       int Add(int i); 
+}
 
-class D : IC
+interface ID : IA, IB {}
+
+class D : ID
 {
        int IA.Add (int i) {
                return 5;
        }
        
-       int IB.Add (int i) {
+       int IA.Add2 (int i) {
                return 6;
        }
+       
+       int IB.Add (int i) {
+               return 7;
+       }
+}
+
+
+class E : IC, ID
+{
+       int IC.Add (int i) {
+               return 8;
+       }
+
+       int IA.Add (int i) {
+               return 9;
+       }
+       
+       int IA.Add2 (int i) {
+               return 10;
+       }
+
+       int IB.Add (int i) {
+               return 11;
+       }
 }
-       
+
 
 class C
 {
-       static int Test(IC n) {
+       static int Test(ID n) {
 
-               if (((IA)n).Add(0) != 5)
+               if (((IA)n).Add2(0) != 6)
                        return 1;
 
-               if (((IB)n).Add(0) != 6)
+               if (((IB)n).Add(0) != 7)
                        return 1;
 
 
@@ -39,8 +70,12 @@ class C
        static int Main()
        {
                D d = new D();
+               E e = new E();
+
+               if (Test (d) != 0)
+                       return 1;
                
-               return Test (d);
+               return 0;
        }
 }