Added/Updated .gitignore files
[mono.git] / mono / tests / custom-attr.cs
index 79b5fdf4bf38adc3ffd56486286b33e976f4fd5a..217a2ebaffe7117db1b2b6a9c8aceeaef82202db 100644 (file)
@@ -40,7 +40,10 @@ namespace Test {
                }
        }
 
-       class ZAttribute : Attribute {
+       interface ZInterface {
+    }
+
+       class ZAttribute : Attribute, ZInterface {
        }
 
        [X, Z, Serializable]
@@ -93,6 +96,16 @@ namespace Test {
                        catch {
                        }
 
+                       if (typeof (Y).GetCustomAttributes (typeof (ZInterface), true).Length != 1)
+                               return 5;
+
+                       if (!typeof (Y).IsDefined (typeof (ZInterface), true))
+                               return 6;
+
+                       // Test that synthetic methods have no attributes
+                       if (typeof(int[,]).GetConstructor (new Type [] { typeof (int), typeof (int) }).GetCustomAttributes (true).Length != 0)
+                               return 7;
+
                        return 0;
                }
        }