Browse Source

Add tests for method ending with finally block/catch handler.

pull/40/head
Daniel Grunwald 15 years ago
parent
commit
9971c664d7
  1. 25
      ICSharpCode.Decompiler/Tests/ExceptionHandling.cs
  2. 1
      ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj

25
ICSharpCode.Decompiler/Tests/ExceptionHandling.cs

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System;
public class ExceptionHandling
{
public void MethodEndingWithEndFinally()
{
try {
throw null;
} finally {
Console.WriteLine();
}
}
public void MethodEndingWithRethrow()
{
try {
throw null;
} catch {
throw;
}
}
}

1
ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj

@ -49,6 +49,7 @@ @@ -49,6 +49,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DelegateConstruction.cs" />
<Compile Include="ExceptionHandling.cs" />
<Compile Include="Loops.cs" />
<Compile Include="PropertiesAndEvents.cs" />
<Compile Include="TestRunner.cs" />

Loading…
Cancel
Save