Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-partial-07.cs
index afb741f4fbfffa3beace0946062afe46744c5a45..496f11bdfab5fd6783d37db9dfb0fa50c96e73ab 100644 (file)
@@ -1,12 +1,37 @@
 using System;
+using System.Reflection;
 using System.Runtime.InteropServices;
 
-[Obsolete]
+[Test2]
 public partial class Test
 { }
 
+
+[AttributeUsage(AttributeTargets.Struct)]
+public partial class TestAttribute: Attribute
+{
+}
+
+[AttributeUsage(AttributeTargets.All)]
+public partial class Test2Attribute: Attribute
+{
+}
+
+[TestAttribute]
+public struct Test_2 {
+}
+
 class X
 {
-       static void Main ()
-       { }
+       public static int Main ()
+       {
+               if (Attribute.GetCustomAttributes (typeof (Test)).Length != 1)
+                       return 1;
+
+               if (Attribute.GetCustomAttributes (typeof (Test_2)).Length != 1)
+                       return 1;
+       
+               Console.WriteLine ("OK");
+               return 0;
+       }
 }