Skip to content

Commit

Permalink
changed TextRunner to accept test file name.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturek committed Mar 1, 2011
1 parent cd200fa commit f25904a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Expand Up @@ -20,7 +20,7 @@ public enum EnumWithFlag
[AttributeUsage(AttributeTargets.All)]
public class MyAttribute : Attribute
{
public MyAttribute(CustomAtributes.EnumWithFlag en)
public MyAttribute(CustomAtributes.EnumWithFlag en) : base()
{
}
}
Expand Down
8 changes: 6 additions & 2 deletions ICSharpCode.Decompiler/Tests/TestRunner.cs
Expand Up @@ -14,9 +14,12 @@ namespace ICSharpCode.Decompiler.Tests
{
public class TestRunner
{
public static void Main()
public static void Main(string[] args)
{
TestFile(@"..\..\Tests\DelegateConstruction.cs");
if (args.Length == 1)
TestFile(args[0]);
else
TestFile(@"..\..\Tests\DelegateConstruction.cs");

Console.ReadKey();
}
Expand All @@ -27,6 +30,7 @@ static void TestFile(string fileName)
AssemblyDefinition assembly = Compile(code);
AstBuilder decompiler = new AstBuilder(new DecompilerContext());
decompiler.AddAssembly(assembly);
decompiler.Transform(new Helpers.RemoveCompilerAttribute());
StringWriter output = new StringWriter();
decompiler.GenerateCode(new PlainTextOutput(output));
StringWriter diff = new StringWriter();
Expand Down

0 comments on commit f25904a

Please sign in to comment.