Browse Source

Add pretty tests for protected, static, and generic interface members

protected and protected internal default interface members, static
properties and field-like events in interfaces, and a generic
interface with a constrained generic default method were not
covered.

Assisted-by: Claude:claude-fable-5:Claude Code
pull/3857/head
Siegfried Pammer 3 days ago committed by Siegfried Pammer
parent
commit
8c16223908
  1. 26
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InterfaceTests.cs

26
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InterfaceTests.cs

@ -104,6 +104,32 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -104,6 +104,32 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
public interface IB
{
}
#if CS80 && !NET40
public interface IProtectedMembers
{
protected void ProtectedMethod();
protected internal void ProtectedInternalMethod()
{
ProtectedMethod();
}
}
public interface IStaticMembers
{
static int StaticProperty { get; set; }
static event EventHandler StaticEvent;
}
public interface IGenericWithDefaultImpl<T>
{
T Value { get; }
T DefaultGet<U>(U key) where U : T
{
return Value;
}
}
#endif
public class C : IA2, IA, IB
{
int IA.Property1 {

Loading…
Cancel
Save