Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git] / mcs / tests / test-partial-26.cs
blob78a543212d0eff01cfc57433458f86d9f7a75a0f
1 using System;
3 namespace TestAttributesCollecting
5 class A : Attribute
9 public partial class X
11 [A]
12 partial void Foo<[A] T>(/*[A]*/ int p);
15 public partial class X
17 partial void Foo<T> (int p)
19 int i;
23 public partial class Y
25 partial void Foo ()
27 int i;
31 public partial class Y
33 [CLSCompliant (true)]
34 partial void Foo ();
37 class Program
39 public static int Main ()
41 var m = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
42 var x = m.GetCustomAttributes (true);
43 Console.WriteLine (x.Length);
44 if (x.Length != 1)
45 return 1;
47 var ga = m.GetGenericArguments ();
48 x = ga [0].GetCustomAttributes (false);
49 if (x.Length != 1)
50 return 2;
52 x = typeof (Y).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true);
53 Console.WriteLine (x.Length);
54 if (x.Length != 1)
55 return 3;
57 return 0;