diff --git a/ICSharpCode.Decompiler/Tests/TestCases/Correctness/Switch.cs b/ICSharpCode.Decompiler/Tests/TestCases/Correctness/Switch.cs index 1de05f154..ea378164e 100644 --- a/ICSharpCode.Decompiler/Tests/TestCases/Correctness/Switch.cs +++ b/ICSharpCode.Decompiler/Tests/TestCases/Correctness/Switch.cs @@ -119,5 +119,30 @@ public static class Switch return null; } } + + public static void SwitchInLoop(int i) + { + while (true) { + switch (i) { + case 1: + Console.WriteLine("one"); + break; + case 2: + Console.WriteLine("two"); + break; + case 3: + Console.WriteLine("three"); + continue; + case 4: + Console.WriteLine("four"); + return; + default: + Console.WriteLine("default"); + Console.WriteLine("more code"); + throw new ArgumentException(); + } + i++; + } + } }