Merge pull request #3647 from BrzVlad/fix-sgen-internal-alloc
[mono.git] / mcs / class / corlib / Test / System.Reflection.Emit / ModuleBuilderTest.cs
index 7f381d63c86c36a38acf4145d9ea0d0956d1f2fd..88ae954687a88ce11d5f10cb3545a875e77c0d35 100644 (file)
@@ -794,5 +794,18 @@ namespace MonoTests.System.Reflection.Emit
                        // ArgumentNullException should not occur.
                        module.GetConstructorToken (method, null);
                }
+
+               [Test]
+               public void GetType ()
+               {
+                       AssemblyBuilder ab = genAssembly ();
+                       ModuleBuilder module = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       TypeBuilder tb = module.DefineType ("t1", TypeAttributes.Public);
+
+                       Assert.AreEqual ("t1[]", module.GetType ("t1[]").FullName);
+                       Assert.AreEqual ("t1*", module.GetType ("t1*").FullName);
+                       Assert.AreEqual ("t1&", module.GetType ("t1&").FullName);
+                       Assert.AreEqual ("t1[]&", module.GetType ("t1[]&").FullName);
+               }
        }
 }