|
|
@@ -240,6 +240,17 @@ namespace MonoTests.System.Reflection.Emit
|
|
|
Assert.AreEqual (typeof (ICollection), tb.BaseType, "#2");
|
|
|
}
|
|
|
|
|
|
+ [Test]
|
|
|
+ public void DefineType_TypeSize ()
|
|
|
+ {
|
|
|
+ AssemblyBuilder ab = genAssembly ();
|
|
|
+ ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
|
|
|
+
|
|
|
+ TypeBuilder tb = mb.DefineType ("Foo", TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.SequentialLayout,
|
|
|
+ typeof (ValueType), 1);
|
|
|
+ Assert.AreEqual (1, tb.Size);
|
|
|
+ }
|
|
|
+
|
|
|
[Test]
|
|
|
[ExpectedException (typeof (ArgumentException))]
|
|
|
public void DuplicateTypeName () {
|