Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-554.cs
1 using System;
2 using System.Reflection;
3
4 namespace Mono.Test
5 {
6         class Program
7         {
8                 public static int Main ()
9                 {
10                         Type t = typeof (B);
11                         InterfaceMapping map = t.GetInterfaceMap (typeof (ITest));
12
13                         foreach (MethodInfo m in map.TargetMethods) {
14                                 if (m.Name.Contains ("."))
15                                         return 3;
16                         }
17
18                         if (map.TargetMethods.Length != 3)
19                                 return 1;
20
21                         MethodInfo[] methods = t.GetMethods (BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
22                         if (methods.Length != 0)
23                                 return 2;
24
25                         return 0;
26                 }
27         }
28
29         public interface ITest
30         {
31                 bool Success
32                 {
33                         get;
34                 }
35
36                 void Run ();
37                 void Gen<T> ();
38         }
39
40         public class A
41         {
42                 public bool Success
43                 {
44                         get { return true; }
45                 }
46
47                 public void Run ()
48                 {
49                 }
50
51                 public void Gen<U> ()
52                 {
53                 }
54         }
55
56         public class B : A, ITest
57         {
58         }
59 }