New test.
[mono.git] / mcs / tests / test-partial-26.cs
1 using System;
2
3 namespace ConsoleApplication1
4 {
5         public partial class X
6         {
7                 [CLSCompliant (true)]
8                 partial void Foo ();
9         }
10
11         public partial class X
12         {
13                 partial void Foo ()
14                 {
15                         int i;
16                 }
17         }
18         
19         public partial class Y
20         {
21                 partial void Foo ()
22                 {
23                         int i;
24                 }
25         }
26         
27         public partial class Y
28         {
29                 [CLSCompliant (true)]
30                 partial void Foo ();
31         }
32
33         class Program
34         {
35                 static int Main ()
36                 {
37                         var x = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true);
38                         Console.WriteLine (x.Length);
39                         if (x.Length != 1)
40                                 return 1;
41
42                         x = typeof (Y).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true);
43                         Console.WriteLine (x.Length);
44                         if (x.Length != 1)
45                                 return 2;
46                         
47                         return 0;
48                 }
49         }
50 }