Browse Source

Add a disabled test for sequence points in all members

pull/3032/head
Kirill Osenkov 2 years ago committed by Siegfried Pammer
parent
commit
5f2b8e6098
  1. 1
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  2. 9
      ICSharpCode.Decompiler.Tests/PdbGenerationTestRunner.cs
  3. 95
      ICSharpCode.Decompiler.Tests/TestCases/PdbGen/Members.xml

1
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -325,6 +325,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="TestCases\PdbGen\Members.xml" />
<Content Include="TestCases\PdbGen\ProgressReporting.xml" /> <Content Include="TestCases\PdbGen\ProgressReporting.xml" />
<Content Include="TestCases\PdbGen\ForLoopTests.xml" /> <Content Include="TestCases\PdbGen\ForLoopTests.xml" />
<Content Include="TestCases\PdbGen\CustomPdbId.xml" /> <Content Include="TestCases\PdbGen\CustomPdbId.xml" />

9
ICSharpCode.Decompiler.Tests/PdbGenerationTestRunner.cs

@ -43,6 +43,13 @@ namespace ICSharpCode.Decompiler.Tests
TestGeneratePdb(); TestGeneratePdb();
} }
[Test]
[Ignore("Duplicate sequence points for local function")]
public void Members()
{
TestGeneratePdb();
}
[Test] [Test]
public void CustomPdbId() public void CustomPdbId()
{ {
@ -155,7 +162,7 @@ namespace ICSharpCode.Decompiler.Tests
ProcessXmlFile(expectedFileName); ProcessXmlFile(expectedFileName);
string generatedFileName = Path.ChangeExtension(xmlFile, ".generated.xml"); string generatedFileName = Path.ChangeExtension(xmlFile, ".generated.xml");
ProcessXmlFile(generatedFileName); ProcessXmlFile(generatedFileName);
Assert.AreEqual(Normalize(expectedFileName), Normalize(generatedFileName)); CodeAssert.AreEqual(Normalize(expectedFileName), Normalize(generatedFileName));
} }
private (string peFileName, string pdbFileName) CompileTestCase(string testName) private (string peFileName, string pdbFileName) CompileTestCase(string testName)

95
ICSharpCode.Decompiler.Tests/TestCases/PdbGen/Members.xml

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<symbols>
<files>
<file id="1" name="-\C.cs" language="C#" checksumAlgorithm="SHA256">
<![CDATA[using System;
internal class C : IDisposable
{
private int ExpressionProperty => 42;
private int Property
{
get
{
return 0;
}
set
{
}
}
private C this[int index] => null;
private C this[string s]
{
get
{
return null;
}
set
{
}
}
public event Action Event
{
add
{
}
remove
{
}
}
public static implicit operator C(int i)
{
return null;
}
static C()
{
}
public C()
{
Console.WriteLine();
}
~C()
{
}
void IDisposable.Dispose()
{
}
private static void Main()
{
C c = new C();
c.Event += delegate
{
};
_ = c.Property;
_ = c.ExpressionProperty;
_ = c[0];
_ = c[""];
_ = (C)1;
Local();
static void Local()
{
Console.WriteLine();
}
}
}
]]></file>
</files>
<methods>
</methods>
<method-spans>
</method-spans>
</symbols>
Loading…
Cancel
Save