[interp] disable assemblyresolve_event6.exe
[mono.git] / mono / tests / iface4.cs
index 72d93951dcf5b7d128c499d637396c51a5fb05c3..6cb9df81d683856c1ec82a7408b59130c6a6dc78 100644 (file)
@@ -6,10 +6,15 @@ public interface IVehicle {
        int Turn ();
 }
 
+public interface IWalker {
+       int Walk ();
+}
+
 public class Base : IVehicle {
        int IVehicle.Start () { return 1; }
        public int Stop () { return 2; }
        public virtual int Turn () { return 3; }
+       public int Walk () { return 1; }
 }
 
 public class Derived1 : Base {
@@ -28,13 +33,18 @@ public class Derived2 : Base, IVehicle {
        public override int Turn () { return 8; }
 }
 
+public class Derived3 : Derived1, IWalker {
+}
+
 public class Test {
 
        static int Main () {
                Derived1 d1 = new Derived1 ();
                Derived2 d2 = new Derived2 ();
+               Derived3 d3 = new Derived3 ();
                Base b1 = d1;
                Base b2 = d2;
+               Base rb = new Base ();
 
                if (d1.Turn () != 4)
                        return 1;
@@ -42,6 +52,9 @@ public class Test {
                if (((IVehicle)d1).Turn () != 4)
                        return 2;
 
+               if (((Base)d2).Turn () != 8)
+                       return 10;
+
                if (((IVehicle)d2).Turn () != 7)
                        return 3;
 
@@ -51,8 +64,19 @@ public class Test {
                if (((IVehicle)b2).Turn () != 7)
                        return 5;
                
-               //Console.WriteLine ("TEST {0}", ((IVehicle)b2).Turn ());       
+               if (((IVehicle)rb).Stop () != 2)
+                       return 6;
+
+               if (((IVehicle)d1).Stop () != 2)
+                       return 7;
+
+               if (((IVehicle)d2).Stop () != 6)
+                       return 8;
+
+               if (d3.Walk () != 1)
+                       return 9;
 
+               //Console.WriteLine ("TEST {0}", ((IVehicle)b2).Turn ());
                return 0;
        }
 }