diff options
author | Jb Evain <jb@evain.net> | 2017-11-17 02:37:22 +0300 |
---|---|---|
committer | Jb Evain <jb@evain.net> | 2017-11-17 02:37:22 +0300 |
commit | 0ef6b79e12b97bea36d12eb5700d0677148a2369 (patch) | |
tree | eb3f3a1787a6e44e5e96328252a9750304088b8f /Test/Mono.Cecil.Tests | |
parent | 1e47c7a228b081aec1e9db02f0433a97ca7b407b (diff) |
Fix #461: wrong StateMachineScopeDebugInformation API
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r-- | Test/Mono.Cecil.Tests/PortablePdbTests.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs index 33b04b2..25ee2d1 100644 --- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs +++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs @@ -320,8 +320,15 @@ namespace Mono.Cecil.Tests { var state_machine_scope = move_next.CustomDebugInformations.OfType<StateMachineScopeDebugInformation> ().FirstOrDefault (); Assert.IsNotNull (state_machine_scope); - Assert.AreEqual (0, state_machine_scope.Start.Offset); - Assert.IsTrue (state_machine_scope.End.IsEndOfMethod); + Assert.AreEqual (3, state_machine_scope.Scopes.Count); + Assert.AreEqual (0, state_machine_scope.Scopes [0].Start.Offset); + Assert.IsTrue (state_machine_scope.Scopes [0].End.IsEndOfMethod); + + Assert.AreEqual (0, state_machine_scope.Scopes [1].Start.Offset); + Assert.AreEqual (0, state_machine_scope.Scopes [1].End.Offset); + + Assert.AreEqual (184, state_machine_scope.Scopes [2].Start.Offset); + Assert.AreEqual (343, state_machine_scope.Scopes [2].End.Offset); var async_body = move_next.CustomDebugInformations.OfType<AsyncMethodBodyDebugInformation> ().FirstOrDefault (); Assert.IsNotNull (async_body); |