2007-05-25 Jonathan Chambers <joncham@gmail.com>
[mcs.git] / tests / gtest-286.cs
blobaa1b1a2779472ea4b85358a21a85d90de8626861
1 using System;
2 using System.Reflection;
4 public class TestAttribute : Attribute
6 public Type type;
8 public TestAttribute(Type type)
10 this.type = type;
14 class C<T>
16 [Test(typeof(C<string>))]
17 public static void Foo()
22 public class C
24 public static int Main ()
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;
31 Console.WriteLine("OK");
32 return 0;