diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs index fe60dc82a..fc0516e7c 100644 --- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs +++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs @@ -748,5 +748,28 @@ public void DoubleWriteAndReadAgainModuleWithDeterministicMvid () 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); + } + }); + } } }