Skip to content

Commit

Permalink
2009-09-02 Rodrigo Kumpera <[email protected]>
Browse files Browse the repository at this point in the history
	* TypeBuilderTest.cs: Test for #536243.

svn path=/trunk/mcs/; revision=141177
  • Loading branch information
kumpera committed Sep 2, 2009
1 parent 91af725 commit 79436b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2009-09-02 Rodrigo Kumpera <[email protected]>

* TypeBuilderTest.cs: Test for #536243.

2009-08-07 Rodrigo Kumpera <[email protected]>

* DynamicMethodTest.cs: Add regression test for bug #529238.
Expand Down
15 changes: 15 additions & 0 deletions mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2187,6 +2187,21 @@ public void TestGetConstructor ()
}
#endif

[Test] //#536243
public void CreateTypeThrowsForMethodsWithBadLabels ()
{
TypeBuilder tb = module.DefineType (genTypeName ());

MethodBuilder mb = tb.DefineMethod("F", MethodAttributes.Public, typeof(string), null);
ILGenerator il_gen = mb.GetILGenerator ();
il_gen.DefineLabel ();
il_gen.Emit (OpCodes.Leave, new Label ());
try {
tb.CreateType ();
Assert.Fail ();
} catch (ArgumentException) {}
}

[Test]
[Category ("NotWorking")]
public void TestIsDefinedIncomplete ()
Expand Down

0 comments on commit 79436b9

Please sign in to comment.