Browse Source

Update some tests, and add some limited descributed in PR to tests(disabled)

pull/1797/head
SilverFox 6 years ago
parent
commit
14cd09d7bc
  1. 4
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs
  2. 56
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs

4
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs

@ -187,7 +187,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
Noop("M3", this.M3); Noop("M3", this.M3);
Noop("M3", M3); Noop("M3", M3);
#if CS80
static void M3()
#else
void M3() void M3()
#endif
{ {
} }

56
ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs

@ -246,6 +246,62 @@ namespace LocalFunctions
Nop<List<T2>>((List<T2>)(object)t3); Nop<List<T2>>((List<T2>)(object)t3);
} }
} }
#if false
public void GenericArgsWithAnonymousType()
{
Method<int>();
#if CS80
static void Method<T2>()
#else
void Method<T2>()
#endif
{
int i = 0;
var obj2 = new {
A = 1
};
Method2(obj2);
Method3(obj2);
void Method2<T3>(T3 obj1)
{
//keep nested
i = 0;
}
#if CS80
static void Method3<T3>(T3 obj1)
#else
void Method3<T3>(T3 obj1)
#endif
{
}
}
}
#if CS80
public void NameConflict()
{
int i = 0;
Method<int>();
void Method<T2>()
{
Method();
void Method()
{
Method<T2>();
i = 0;
void Method<T2>()
{
i = 0;
Method();
static void Method()
{
}
}
}
}
}
#endif
#endif
} }
private int field; private int field;

Loading…
Cancel
Save