Browse files

changed TextRunner to accept test file name.

  • Loading branch information...
1 parent cd200fa commit f25904a47432767797efae10ffa8e1ad285b0ada @arturek arturek committed Mar 1, 2011
View
2 ICSharpCode.Decompiler/Tests/CustomAttributes/S_CustomAttributes.cs
@@ -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()
{
}
}
View
8 ICSharpCode.Decompiler/Tests/TestRunner.cs
@@ -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();
}
@@ -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();

0 comments on commit f25904a

Please sign in to comment.