eol
[mcs.git] / tests / test-14.cs
blobdac824b6028f87e6ad2f7763b2643f722f5deaa5
1 using System;
3 namespace Obj {
4 interface Bah {
5 int H ();
7 class A : Bah {
8 public int F () {return 1;}
9 public virtual int G () {return 2;}
10 public int H () {return 10;}
12 class B : A {
13 public new int F () {return 3;}
14 public override int G () {return 4;}
15 public new int H () {return 11;}
17 class Test {
18 static public int Main () {
19 int result = 0;
20 B b = new B ();
21 A a = b;
22 if (a.F () != 1)
23 result |= 1 << 0;
24 if (b.F () != 3)
25 result |= 1 << 1;
26 if (b.G () != 4)
27 result |= 1 << 2;
28 if (a.G () != 4){
29 Console.WriteLine ("oops: " + a.G ());
30 result |= 1 << 3;
32 if (a.H () != 10)
33 result |= 1 << 4;
34 if (b.H () != 11)
35 result |= 1 << 5;
36 if (((A)b).H () != 10)
37 result |= 1 << 6;
38 if (((B)a).H () != 11)
39 result |= 1 << 7;
40 return result;