[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / test-14.cs
blob803b9376cb0a9c9135a04581be34bc44f84e7602
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 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;
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;