2010-02-13 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / test-134.cs
blob35cb5c0c15b247f15bed502d5d651adb8af31940
1 //
2 // This test checks if we implement all the interfaces inherited
3 //
5 interface IA {
6 void A ();
9 interface IB : IA {
10 void B ();
13 interface IC : IA, IB {
14 void C ();
17 interface ID : IC {
20 class AA : IC {
21 bool a, b, c;
22 public void A () { a = true; }
23 public void B () { b = true; }
24 public void C () { c = true; }
26 public bool OK {
27 get {
28 return a && b && c;
33 class BB : ID{
34 bool a, b, c;
35 public void A () { a = true; System.Console.WriteLine ("A"); }
36 public void B () { b = true; }
37 public void C () { c = true; }
39 public bool OK {
40 get {
41 return a && b && c;
46 class T: IB {
47 public void A () {}
48 public void B () {}
50 static int Main() {
52 BB bb = new BB ();
53 bb.A ();
54 bb.B ();
55 bb.C ();
57 if (!bb.OK)
58 return 1;
60 AA aa = new AA ();
61 aa.A ();
62 aa.B ();
63 aa.C ();
64 if (!aa.OK)
65 return 2;
67 return 0;