From 2931460793daab2dd7ede5875d462e1ad1a2ff7d Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 27 Aug 2017 16:07:52 +0200 Subject: [PATCH] Adjust unit tests for AssignVariableNames --- .../Tests/TestCases/Pretty/AnonymousTypes.cs | 32 +++++++++---------- .../TestCases/Pretty/InlineAssignmentTest.cs | 18 +++++------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ICSharpCode.Decompiler/Tests/TestCases/Pretty/AnonymousTypes.cs b/ICSharpCode.Decompiler/Tests/TestCases/Pretty/AnonymousTypes.cs index 4c4d397e5..db137feb4 100644 --- a/ICSharpCode.Decompiler/Tests/TestCases/Pretty/AnonymousTypes.cs +++ b/ICSharpCode.Decompiler/Tests/TestCases/Pretty/AnonymousTypes.cs @@ -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 } }; - 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 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); } } } diff --git a/ICSharpCode.Decompiler/Tests/TestCases/Pretty/InlineAssignmentTest.cs b/ICSharpCode.Decompiler/Tests/TestCases/Pretty/InlineAssignmentTest.cs index 8e5f4488d..24510f8ea 100644 --- a/ICSharpCode.Decompiler/Tests/TestCases/Pretty/InlineAssignmentTest.cs +++ b/ICSharpCode.Decompiler/Tests/TestCases/Pretty/InlineAssignmentTest.cs @@ -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 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)