Author: raja
Date: 2005-12-09 06:17:30 -0500 (Fri, 09 Dec 2005)
New Revision: 54156
Modified:
trunk/mcs/class/corlib/Test/System/ChangeLog
trunk/mcs/class/corlib/Test/System/TypeTest.cs
Log:
* TypeTest.cs (TypeParameterIsNotGeneric): New. Test invariants
listed in MSDN docs.
Modified: trunk/mcs/class/corlib/Test/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System/ChangeLog 2005-12-09 10:56:37 UTC
(rev 54155)
+++ trunk/mcs/class/corlib/Test/System/ChangeLog 2005-12-09 11:17:30 UTC
(rev 54156)
@@ -1,3 +1,8 @@
+2005-12-09 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * TypeTest.cs (TypeParameterIsNotGeneric): New. Test invariants
+ listed in MSDN docs.
+
2005-12-08 Sebastien Pouliot <[EMAIL PROTECTED]>
* AppDomainSetupTest.cs: Adapted tests to work on both Mono/MS and
Modified: trunk/mcs/class/corlib/Test/System/TypeTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System/TypeTest.cs 2005-12-09 10:56:37 UTC
(rev 54155)
+++ trunk/mcs/class/corlib/Test/System/TypeTest.cs 2005-12-09 11:17:30 UTC
(rev 54156)
@@ -485,6 +485,20 @@
Assert.IsNull (parameters[0].ParameterType.FullName);
Assert.IsNotNull (parameters[0].ParameterType.ToString
());
}
+
+ [Test]
+ public void TypeParameterIsNotGeneric ()
+ {
+ Type fooType = typeof (Foo<>);
+ Type type_param = fooType.GetGenericArguments () [0];
+ Assert.IsTrue (type_param.IsGenericParameter);
+ Assert.IsFalse (type_param.IsGenericType);
+ Assert.IsFalse (type_param.IsGenericTypeDefinition);
+
+ // LAMESPEC: MSDN claims that this should be false, but
.NET v2.0.50727 says it's true
+ //
http://msdn2.microsoft.com/en-us/library/system.type.isgenerictype.aspx
+ Assert.IsTrue (type_param.ContainsGenericParameters);
+ }
#endif
public class NemerleAttribute : Attribute
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches