Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-partial-07.cs
1 using System;
2 using System.Reflection;
3 using System.Runtime.InteropServices;
4
5 [Test2]
6 public partial class Test
7 { }
8
9
10 [AttributeUsage(AttributeTargets.Struct)]
11 public partial class TestAttribute: Attribute
12 {
13 }
14
15 [AttributeUsage(AttributeTargets.All)]
16 public partial class Test2Attribute: Attribute
17 {
18 }
19
20 [TestAttribute]
21 public struct Test_2 {
22 }
23
24 class X
25 {
26         public static int Main ()
27         {
28                 if (Attribute.GetCustomAttributes (typeof (Test)).Length != 1)
29                         return 1;
30
31                 if (Attribute.GetCustomAttributes (typeof (Test_2)).Length != 1)
32                         return 1;
33         
34                 Console.WriteLine ("OK");
35                 return 0;
36         }
37 }