Author: raja
Date: 2006-06-29 08:39:47 -0400 (Thu, 29 Jun 2006)
New Revision: 62139

Modified:
   trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
   trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
Log:
* MethodInfoTest.cs (GetBaseDefinition): New test for
MethodInfo.GetBaseDefinition.


Modified: trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog     2006-06-29 
12:38:15 UTC (rev 62138)
+++ trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog     2006-06-29 
12:39:47 UTC (rev 62139)
@@ -1,3 +1,8 @@
+2006-06-29  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * MethodInfoTest.cs (GetBaseDefinition): New test for
+       MethodInfo.GetBaseDefinition.
+
 2006-06-07  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * BinderTests.cs: Add test for BindingFlags.ExactBinding.

Modified: trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs     
2006-06-29 12:38:15 UTC (rev 62138)
+++ trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs     
2006-06-29 12:39:47 UTC (rev 62139)
@@ -160,6 +160,20 @@
                                this.GetType ().GetMethod ("HeyHey").ToString 
());
                }
 
+               class GBD_A         { public virtual     void f () {} }
+               class GBD_B : GBD_A { public override    void f () {} }
+               class GBD_C : GBD_B { public override    void f () {} }
+               class GBD_D : GBD_C { public new virtual void f () {} }
+               class GBD_E : GBD_D { public override    void f () {} }
+
+               [Test]
+               public void GetBaseDefinition ()
+               {
+                       Assert.AreEqual (typeof (GBD_A), typeof 
(GBD_C).GetMethod ("f").GetBaseDefinition ().DeclaringType);
+                       Assert.AreEqual (typeof (GBD_D), typeof 
(GBD_D).GetMethod ("f").GetBaseDefinition ().DeclaringType);
+                       Assert.AreEqual (typeof (GBD_D), typeof 
(GBD_E).GetMethod ("f").GetBaseDefinition ().DeclaringType);
+               }
+
 #if NET_2_0
                [Test]
                public void GetMethodBody_Abstract () {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to