Browse Source

Add unit test

pull/2972/head
ElektroKill 3 years ago
parent
commit
64e6c6318f
No known key found for this signature in database
GPG Key ID: 7E3C5C084E40E3EC
  1. 15
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ReduceNesting.cs

15
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ReduceNesting.cs

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
@ -566,5 +567,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -566,5 +567,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
}
private static string DuplicateReturnTest(IDictionary<int, string> dict)
{
string value;
lock (dict)
{
if (!dict.TryGetValue(1, out value))
{
value = "test";
dict.Add(1, value);
}
}
return value;
}
}
}

Loading…
Cancel
Save