Browse Source

Adjust unit tests for AssignVariableNames

pull/832/head
Siegfried Pammer 8 years ago
parent
commit
2931460793
  1. 32
      ICSharpCode.Decompiler/Tests/TestCases/Pretty/AnonymousTypes.cs
  2. 18
      ICSharpCode.Decompiler/Tests/TestCases/Pretty/InlineAssignmentTest.cs

32
ICSharpCode.Decompiler/Tests/TestCases/Pretty/AnonymousTypes.cs

@ -24,24 +24,24 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -24,24 +24,24 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
private void SimpleTypes()
{
var V_0 = new {
var value = new {
};
var V_1 = new {
var anon = new {
X = 5
};
var V_2 = new {
var anon2 = new {
X = 5,
Y = 10
};
Console.WriteLine((object)V_0);
Console.WriteLine(V_1.X);
Console.WriteLine(V_2.Y + V_2.X);
Console.WriteLine((object)value);
Console.WriteLine(anon.X);
Console.WriteLine(anon2.Y + anon2.X);
}
private void SimpleArray()
{
var V_0 = new[] {
var array = new[] {
new {
X = 5,
Y = 2,
@ -54,13 +54,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -54,13 +54,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
};
Console.WriteLine(V_0[0].X);
Console.WriteLine(V_0[1].X);
Console.WriteLine(array[0].X);
Console.WriteLine(array[1].X);
}
private void JaggedArray()
{
var V_0 = new[] {
var array = new[] {
new {
X = 5,
Y = 2,
@ -72,14 +72,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -72,14 +72,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
Z = -6
}
};
var V_1 = new[] {
V_0,
V_0
var array2 = new[] {
array,
array
};
Console.WriteLine(V_0[0].X);
Console.WriteLine(V_0[1].X);
Console.WriteLine(V_1.Length);
Console.WriteLine(array[0].X);
Console.WriteLine(array[1].X);
Console.WriteLine(array2.Length);
}
}
}

18
ICSharpCode.Decompiler/Tests/TestCases/Pretty/InlineAssignmentTest.cs

@ -28,12 +28,12 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -28,12 +28,12 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
public void SimpleInlineWithLocals()
{
int V_0;
Console.WriteLine(V_0 = 5);
Console.WriteLine(V_0);
InlineAssignmentTest V_1;
Console.WriteLine((object)(V_1 = new InlineAssignmentTest()));
Console.WriteLine((object)V_1);
int value;
Console.WriteLine(value = 5);
Console.WriteLine(value);
InlineAssignmentTest value2;
Console.WriteLine((object)(value2 = new InlineAssignmentTest()));
Console.WriteLine((object)value2);
}
public void SimpleInlineWithFields()
@ -61,9 +61,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -61,9 +61,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
public void AccessArray(int[] a)
{
int V_0;
Console.WriteLine(V_0 = a[0]);
Console.WriteLine(a[V_0] = V_0);
int num;
Console.WriteLine(num = a[0]);
Console.WriteLine(a[num] = num);
}
public int Return(ref int a)

Loading…
Cancel
Save