Author: zoltan
Date: 2005-05-12 08:27:17 -0400 (Thu, 12 May 2005)
New Revision: 44435
Modified:
trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
Log:
2005-05-12 Zoltan Varga <[EMAIL PROTECTED]>
* TypeBuilderTest.cs: Add tests for bug #74906.
Modified: trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
2005-05-12 12:25:34 UTC (rev 44434)
+++ trunk/mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
2005-05-12 12:27:17 UTC (rev 44435)
@@ -1,3 +1,7 @@
+2005-05-12 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * TypeBuilderTest.cs: Add tests for bug #74906.
+
2005-04-30 Ben Maurer <[EMAIL PROTECTED]>
* TypeBuilderTest.cs: Don't write to a specific path in /tmp --
Modified: trunk/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
2005-05-12 12:25:34 UTC (rev 44434)
+++ trunk/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
2005-05-12 12:27:17 UTC (rev 44435)
@@ -1820,5 +1820,23 @@
// bug #73469
Assert ("02", typeof (Bar[]).IsAssignableFrom (module.GetType
(tb.FullName + "[]")));
}
+
+ [Test]
+ [ExpectedException (typeof (InvalidOperationException))]
+ public void EmptyMethodBody () {
+ TypeBuilder tb = module.DefineType (genTypeName (),
TypeAttributes.Public);
+
+ tb.DefineMethod ("foo", MethodAttributes.Public, typeof (void),
new Type [] {});
+ tb.CreateType ();
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidOperationException))]
+ public void EmptyCtorBody () {
+ TypeBuilder tb = module.DefineType (genTypeName (),
TypeAttributes.Public);
+
+ tb.DefineConstructor (0, CallingConventions.Standard, null);
+ tb.CreateType ();
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches