[netcore] Disable a flaky test on interpreter (#18904)
[mono-project.git] / mono / tests / iface6.cs
blob6e89a23e7f4022d08a9cb83ff7bf91b83804cda5
1 using System;
3 interface IA
5 int Add(int i);
8 interface IB
10 int Add(int i);
13 interface IC : IA, IB {}
15 interface IE : ICloneable, IDisposable {
16 void doom ();
19 class D : IC, IB
21 int IA.Add (int i) {
22 return 5;
25 int IB.Add (int i) {
26 return 6;
30 class E: IE, IC {
31 public E() {
33 public void doom () {
34 return;
36 public Object Clone () {
37 return null;
39 public void Dispose () {}
40 int IA.Add (int i) {
41 return 7;
44 int IB.Add (int i) {
45 return 8;
49 class C
51 static int Test(IC n) {
53 if (((IA)n).Add(0) != 5)
54 return 1;
56 if (((IB)n).Add(0) != 6)
57 return 1;
60 return 0;
63 static void Test2(IE ie) {
64 ie.doom ();
65 object o = ie.Clone();
66 ie.Dispose ();
69 static int Main()
71 D d = new D();
72 E e = new E();
73 int a = Test (e);
74 Test2 (e);
76 return Test (d);