Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-14.cs
1 using System;
2
3 namespace Obj {
4         interface Bah {
5                 int H ();
6         }
7         class A : Bah {
8                 public int F () {return 1;}
9                 public virtual int G () {return 2;}
10                 public int H () {return 10;}
11         }
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;}
16         }
17         class Test {
18                 public static 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;
31                         }
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;
41                 }
42         };
43 };