2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 2 Feb 2009 20:29:16 +0000 (20:29 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 2 Feb 2009 20:29:16 +0000 (20:29 -0000)
* TypeTest.cs: Add a test for #471255.

svn path=/trunk/mcs/; revision=125403

mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/TypeTest.cs

index 7fbaacc6254a6d7e3c3c0959063842184746c6dc..193c4810f932b6756ea5e298c988b72ce82536d1 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-02  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * TypeTest.cs: Add a test for #471255.
+
 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
 
        * TypeTest.cs: Add a test for #467229.
index 68e04f486ed197e4d8a68b204b38fae535f6cfa6..3c269429bf506d5e2c7d388007db606cc67921e5 100644 (file)
@@ -3063,6 +3063,16 @@ PublicKeyToken=b77a5c561934e089"));
                        Assert.AreEqual(1, mArgs[0].GetCustomAttributes (typeof (DocAttribute), true).Length, "#1");
                }
 
+               [Test] //bug #471255
+               public void GetTypeCalledUsingReflection ()
+               {
+                       Type expectedType = Type.GetType ("NoNamespaceClass");
+                       Assert.IsNotNull (expectedType, "#1");
+                       MethodInfo m = typeof (Type).GetMethod ("GetType",  BindingFlags.Public | BindingFlags.Static, null, new Type [] { typeof (string) },  null);
+                       object r = m.Invoke (null, BindingFlags.Default, null, new object [] { "NoNamespaceClass" }, CultureInfo.InvariantCulture);
+                       Assert.AreSame (expectedType, r, "#2");
+               }
+
        [Test]
        public void EqualsUserType () {
                UserType2 t1 = new UserType2(null);