Merge pull request #901 from Blewzman/FixAggregateExceptionGetBaseException
[mono.git] / mcs / class / corlib / Test / System / TypeTest.cs
index 8972880062692c9fb0a14cc09e6dce1de7d5505b..6d5431e082d30b8533e4c1a318ee66c3d2d66236 100644 (file)
@@ -141,6 +141,8 @@ namespace MonoTests.System
                        get { return 1; }
                        set { }
                }
+
+               public event EventHandler E;
        }
 
        class Derived1 : Base1
@@ -156,6 +158,8 @@ namespace MonoTests.System
                        get { return 1; }
                        set { }
                }
+
+               public event Action E;
        }
 
        public class Foo<T>
@@ -399,6 +403,14 @@ namespace MonoTests.System
                        Assert.AreEqual (1, typeof (Derived1).GetProperties ().Length, "#03");
                }
 
+               [Test]
+               public void GetEvents ()
+               {
+                       // Test hide-by-name
+                       Assert.AreEqual (1, typeof (Derived2).GetEvents ().Length);
+                       Assert.AreEqual (typeof (Derived2), typeof (Derived2).GetEvents ()[0].DeclaringType);
+               }
+
                [Test]
                public void GetProperties ()
                {