Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / gtest-286.cs
1 using System;
2 using System.Reflection;
3
4 public class TestAttribute : Attribute
5 {
6     public Type type;
7
8     public TestAttribute(Type type)
9     {
10         this.type = type;
11     }
12 }
13
14 class C<T>
15 {
16     [Test(typeof(C<string>))]
17     public static void Foo()
18     {
19     }
20 }
21
22 public class C
23 {
24         public static int Main ()
25         {
26                 MethodInfo mi = typeof (C<>).GetMethod ("Foo");
27                 object[] a = mi.GetCustomAttributes (false);
28                 if (((TestAttribute)a[0]).type.ToString() != "C`1[System.String]")
29                         return 1;
30
31                 Console.WriteLine("OK");
32                 return 0;
33         }
34 }