Author: raja
Date: 2007-06-22 08:35:57 -0400 (Fri, 22 Jun 2007)
New Revision: 80547

Modified:
   trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
   trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
Log:
* MethodInfoTest.cs (IsGenericMethodDefinition): New.


Modified: trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog     2007-06-22 
12:35:05 UTC (rev 80546)
+++ trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog     2007-06-22 
12:35:57 UTC (rev 80547)
@@ -1,3 +1,7 @@
+2007-06-22  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * MethodInfoTest.cs (IsGenericMethodDefinition): New.
+
 2007-06-02  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * PropertyInfoTest.cs: Mark new test as NotWorking.

Modified: trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs     
2007-06-22 12:35:05 UTC (rev 80546)
+++ trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs     
2007-06-22 12:35:57 UTC (rev 80547)
@@ -376,6 +376,22 @@
                        Assert.IsTrue (typeof 
(A<int>.B).GetGenericTypeDefinition ().GetMethod 
("Baz").ContainsGenericParameters);
                }
 
+               [Test]
+               public void IsGenericMethodDefinition ()
+               {
+                       MethodInfo m1 = typeof (A<>).GetMethod ("Foo");
+                       Assert.IsTrue (m1.IsGenericMethod);
+                       Assert.IsTrue (m1.IsGenericMethodDefinition);
+
+                       MethodInfo m2 = typeof (A<int>).GetMethod ("Foo");
+                       Assert.IsTrue (m2.IsGenericMethod);
+                       Assert.IsTrue (m2.IsGenericMethodDefinition);
+
+                       MethodInfo m3 = m2.MakeGenericMethod (typeof (int));
+                       Assert.IsTrue (m3.IsGenericMethod);
+                       Assert.IsFalse (m3.IsGenericMethodDefinition);
+               }
+
                class GenericHelper<T>
                {
                        public void Test (T t)

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

Reply via email to