Author: raja
Date: 2008-02-20 03:22:24 -0500 (Wed, 20 Feb 2008)
New Revision: 96225
Modified:
trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs
trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
trunk/mcs/errors/known-issues-gmcs
trunk/mcs/errors/known-issues-smcs
trunk/mcs/tests/known-issues-smcs
Log:
In class/corlib/Test/System.Reflection.Emit:
* MethodBuilderTest.cs (Bug354757): New test.
In class/corlib/Test/System.Reflection:
* MethodInfoTest.cs (GetGenericMethodDefinition): Add a test for
an instantiation.
(Bug354757): New test.
Modified: trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog 2008-02-20
08:21:00 UTC (rev 96224)
+++ trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog 2008-02-20
08:22:24 UTC (rev 96225)
@@ -1,3 +1,9 @@
+2008-02-20 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * MethodInfoTest.cs (GetGenericMethodDefinition): Add a test for
+ an instantiation.
+ (Bug354757): New test.
+
2008-02-18 Zoltan Varga <[EMAIL PROTECTED]>
* CustomAttributeDataTest.cs: New file.
@@ -11,7 +17,7 @@
* AssemblyTest.cs (GetModules_MissingFile): Rename the generated
assembly to
avoid name clashes.
-
+
* AssemblyTest.cs: Add a test for GetModules () and a missing module.
* ModuleTest.cs: Add a test for GetTypes ().
Modified: trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
2008-02-20 08:21:00 UTC (rev 96224)
+++ trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
2008-02-20 08:22:24 UTC (rev 96225)
@@ -551,8 +551,21 @@
Assert.IsTrue (mi3.IsGenericMethod, "#B1");
Assert.IsTrue (mi3.IsGenericMethodDefinition, "#B2");
Assert.AreSame (mi2, mi3, "#B3");
+
+ MethodInfo mi4 = mi2.MakeGenericMethod (typeof (short));
+ Assert.IsTrue (mi4.IsGenericMethod, "#C1");
+ Assert.IsFalse (mi4.IsGenericMethodDefinition, "#C2");
+ Assert.AreSame (mi2, mi4.GetGenericMethodDefinition (),
"#C3");
}
+ [Test]
+ public void Bug354757 ()
+ {
+ MethodInfo gmd = (typeof (MyList <int>)).GetMethod
("ConvertAll");
+ MethodInfo oi = gmd.MakeGenericMethod
(gmd.GetGenericArguments ());
+ Assert.AreSame (gmd, oi);
+ }
+
public class MyList<T>
{
public TOutput ConvertAll<TOutput> (Foo<T,TOutput> arg)
Modified: trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
2008-02-20 08:21:00 UTC (rev 96224)
+++ trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
2008-02-20 08:22:24 UTC (rev 96225)
@@ -1,3 +1,7 @@
+2008-02-20 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * MethodBuilderTest.cs (Bug354757): New test.
+
2008-01-29 Zoltan Varga <[EMAIL PROTECTED]>
* ModuleBuilderTest.cs: Add tests for GetTypes ().
Modified:
trunk/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs
2008-02-20 08:21:00 UTC (rev 96224)
+++ trunk/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs
2008-02-20 08:22:24 UTC (rev 96225)
@@ -928,6 +928,22 @@
Assert.AreEqual (generatedGenericType.MakeGenericType
(new Type [] { typeof (int) }), mi2.Invoke (null, new object [] { 1 }));
}
+ [Test]
+ public void Bug354757 ()
+ {
+ TypeBuilder gtb = module.DefineType (genTypeName (),
TypeAttributes.Public);
+ gtb.DefineGenericParameters ("T");
+ MethodBuilder mb = gtb.DefineMethod ("foo",
MethodAttributes.Public);
+ mb.DefineGenericParameters ("S");
+ Assert.IsTrue (mb.IsGenericMethodDefinition);
+
+ Type gt = gtb.MakeGenericType (typeof (object));
+ MethodInfo m = TypeBuilder.GetMethod (gt, mb);
+ Assert.IsTrue (m.IsGenericMethodDefinition);
+
+ MethodInfo mopen = m.MakeGenericMethod
(m.GetGenericArguments ());
+ Assert.IsFalse (mopen.IsGenericMethodDefinition);
+ }
#endif
}
}
Modified: trunk/mcs/errors/known-issues-gmcs
===================================================================
--- trunk/mcs/errors/known-issues-gmcs 2008-02-20 08:21:00 UTC (rev 96224)
+++ trunk/mcs/errors/known-issues-gmcs 2008-02-20 08:22:24 UTC (rev 96225)
@@ -41,6 +41,3 @@
cs1533.cs IGNORE
gcs0820.cs # temporary disabled
-
-gcs0411.cs # Runtime bug #354757
-gcs0411-2.cs # Runtime bug #354757
Modified: trunk/mcs/errors/known-issues-smcs
===================================================================
--- trunk/mcs/errors/known-issues-smcs 2008-02-20 08:21:00 UTC (rev 96224)
+++ trunk/mcs/errors/known-issues-smcs 2008-02-20 08:22:24 UTC (rev 96225)
@@ -104,8 +104,6 @@
cs3009-2.cs
cs3010.cs
gcs0037-2.cs
-gcs0411-2.cs # Runtime bug #354757
-gcs0411.cs # Runtime bug #354757
gcs0729.cs
gcs0730.cs
gcs0733.cs
Modified: trunk/mcs/tests/known-issues-smcs
===================================================================
--- trunk/mcs/tests/known-issues-smcs 2008-02-20 08:21:00 UTC (rev 96224)
+++ trunk/mcs/tests/known-issues-smcs 2008-02-20 08:22:24 UTC (rev 96225)
@@ -11,7 +11,6 @@
test-389.cs
test-539.cs
test-562.cs
-test-587.cs
test-xml-035.cs
test-xml-038.cs
gtest-166-lib.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches