static int Main () {
		Derived1 d1 = new Derived1 ();
		Derived2 d2 = new Derived2 ();
		Base b1 = d1;
		Base b2 = d2;

		if (d1.Turn () != 4)
			return 1;
		
		if (((IVehicle)d1).Turn () != 4)
			return 2;

		if (((IVehicle)d2).Turn () != 7)
			return 3;

		if (b2.Turn () != 8)
			return 4;
		
		if (((IVehicle)b2).Turn () != 7)
			return 5;
		
		//Console.WriteLine ("TEST {0}", ((IVehicle)b2).Turn ());	

		return 0;
	}
Exemple #2
0
	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;
		
		if (((IVehicle)d1).Turn () != 4)
			return 2;

		if (((Base)d2).Turn () != 8)
			return 10;

		if (((IVehicle)d2).Turn () != 7)
			return 3;

		if (b2.Turn () != 8)
			return 4;
		
		if (((IVehicle)b2).Turn () != 7)
			return 5;
		
		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;
	}
Exemple #3
0
    public static int Main()
    {
        Derived1 d1 = new Derived1();
        Derived2 d2 = new Derived2();
        Base     b1 = d1;
        Base     b2 = d2;

        if (d1.Turn() != 4)
        {
            return(1);
        }

        if (((IVehicle)d1).Turn() != 4)
        {
            return(2);
        }

        if (((IVehicle)d2).Turn() != 7)
        {
            return(3);
        }

        if (b2.Turn() != 8)
        {
            return(4);
        }

        if (((IVehicle)b2).Turn() != 7)
        {
            return(5);
        }

        //Console.WriteLine ("TEST {0}", ((IVehicle)b2).Turn ());

        return(0);
    }
 static int Main()
 {
     Derived1
     d1
     =
     new
     Derived1
     ();
     Derived2
     d2
     =
     new
     Derived2
     ();
     Base
     b1
     =
     d1;
     Base
     b2
     =
     d2;
     if
     (d1.Turn
     ()
     !=
     4)
     return
     1;
     if
     (((IVehicle)d1).Turn
     ()
     !=
     4)
     return
     2;
     if
     (((IVehicle)d2).Turn
     ()
     !=
     7)
     return
     3;
     if
     (b2.Turn
     ()
     !=
     8)
     return
     4;
     if
     (((IVehicle)b2).Turn
     ()
     !=
     7)
     return
     5;
     return
     0;
 }
    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);
        }

        if (((IVehicle)d1).Turn() != 4)
        {
            return(2);
        }

        if (((Base)d2).Turn() != 8)
        {
            return(10);
        }

        if (((IVehicle)d2).Turn() != 7)
        {
            return(3);
        }

        if (b2.Turn() != 8)
        {
            return(4);
        }

        if (((IVehicle)b2).Turn() != 7)
        {
            return(5);
        }

        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);
    }