Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jb@evain.net>2017-02-28 22:03:34 +0300
committerJb Evain <jb@evain.net>2017-02-28 22:16:44 +0300
commit028e1b33a1b3de40a22e980ca7b6f0c709b79b51 (patch)
tree1ed167d1fc927247250563904890c624e1c67d55 /Test/Mono.Cecil.Tests
parentf4b6ff272f73d0de833b5faa9a0643c1d6a67144 (diff)
Add support for branches past the method body
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r--Test/Mono.Cecil.Tests/MethodBodyTests.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/MethodBodyTests.cs b/Test/Mono.Cecil.Tests/MethodBodyTests.cs
index 62ae1cc..eb515f5 100644
--- a/Test/Mono.Cecil.Tests/MethodBodyTests.cs
+++ b/Test/Mono.Cecil.Tests/MethodBodyTests.cs
@@ -282,6 +282,23 @@ namespace Mono.Cecil.Tests {
}
[Test]
+ public void BranchOutsideMethod ()
+ {
+ TestIL ("branch-out.il", module => {
+ var type = module.GetType ("Foo");
+ var method = type.GetMethod ("BranchOutside");
+
+ Assert.IsNotNull (method);
+ Assert.IsNotNull (method.Body);
+
+ var leave = method.Body.Instructions [0];
+ Assert.AreEqual (OpCodes.Leave, leave.OpCode);
+ Assert.IsNull (leave.Operand);
+ Assert.AreEqual ("IL_0000: leave", leave.ToString ());
+ }, verify: false);
+ }
+
+ [Test]
public void Iterator ()
{
TestModule ("iterator.exe", module => {