Initial set of Ward sgen annotations (#5705)
[mono.git] / mcs / tests / test-297.cs
index 993a6ba521a153bf9555260b32d98ee14825d71d..6d9f82d12dcabc8030d945fdd31708c79b68be9f 100644 (file)
@@ -4,7 +4,7 @@ using System;
 [My(TypeCode.Empty)]
 [My(typeof(System.Enum))]
 class T {
-       static int Main() {
+       public static int Main() {
                object[] a = Attribute.GetCustomAttributes (typeof (T), false);
                if (a.Length != 3)
                        return 1;
@@ -26,8 +26,17 @@ class T {
                                return 5;
                        
                }
+                
+               object[] ats = typeof(T).GetMethod("Login").GetCustomAttributes (typeof(My), true);
+               My at = (My) ats[0];
+                if (at.Val != AnEnum.a)
+                    return 6;
+                
                return 0;
        }
+        
+       [My(1, Val=AnEnum.a)]
+       public void Login(string a)     {}        
 }
 
 [AttributeUsage(AttributeTargets.All,AllowMultiple=true)]
@@ -36,4 +45,12 @@ class My : Attribute {
        public My (object o) {
                obj = o;
        }
+        
+       public AnEnum Val; 
 }
+
+public enum AnEnum
+{
+       a,b,c
+}
+