diff options
author | Lucas Trzesniewski <lucas.trzesniewski@gmail.com> | 2020-10-13 21:45:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 21:45:52 +0300 |
commit | a1105a49ada467404f8bc0436cb84a0ab36ef4c4 (patch) | |
tree | 699e274ea4d4f79e3ae6549244c12e71371c2e95 /Test/Mono.Cecil.Tests | |
parent | 90e23f1b30b179739eeb61bf0988863b1262b262 (diff) |
Add failing test for #694 (#695)
Co-authored-by: Jb Evain <jb@evain.net>
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r-- | Test/Mono.Cecil.Tests/PortablePdbTests.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs index fe60dc8..fc0516e 100644 --- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs +++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs @@ -748,5 +748,28 @@ class Program Assert.AreNotEqual (mvid1_in, mvid2_in); Assert.AreNotEqual (mvid1_out, mvid2_out); } + + [Test] + public void ClearSequencePoints () + { + TestPortablePdbModule (module => { + var type = module.GetType ("PdbTarget.Program"); + var main = type.GetMethod ("Main"); + + main.DebugInformation.SequencePoints.Clear (); + + var destination = Path.Combine (Path.GetTempPath (), "mylib.dll"); + module.Write(destination, new WriterParameters { WriteSymbols = true }); + + Assert.Zero (main.DebugInformation.SequencePoints.Count); + + using (var resultModule = ModuleDefinition.ReadModule (destination, new ReaderParameters { ReadSymbols = true })) { + type = resultModule.GetType ("PdbTarget.Program"); + main = type.GetMethod ("Main"); + + Assert.Zero (main.DebugInformation.SequencePoints.Count); + } + }); + } } } |