Browse Source

changed TextRunner to accept test file name.

pull/70/head
Artur Zgodziski 15 years ago
parent
commit
f25904a474
  1. 2
      ICSharpCode.Decompiler/Tests/CustomAttributes/S_CustomAttributes.cs
  2. 8
      ICSharpCode.Decompiler/Tests/TestRunner.cs

2
ICSharpCode.Decompiler/Tests/CustomAttributes/S_CustomAttributes.cs

@ -20,7 +20,7 @@ namespace aa
[AttributeUsage(AttributeTargets.All)] [AttributeUsage(AttributeTargets.All)]
public class MyAttribute : Attribute public class MyAttribute : Attribute
{ {
public MyAttribute(CustomAtributes.EnumWithFlag en) public MyAttribute(CustomAtributes.EnumWithFlag en) : base()
{ {
} }
} }

8
ICSharpCode.Decompiler/Tests/TestRunner.cs

@ -14,9 +14,12 @@ namespace ICSharpCode.Decompiler.Tests
{ {
public class TestRunner 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(); Console.ReadKey();
} }
@ -27,6 +30,7 @@ namespace ICSharpCode.Decompiler.Tests
AssemblyDefinition assembly = Compile(code); AssemblyDefinition assembly = Compile(code);
AstBuilder decompiler = new AstBuilder(new DecompilerContext()); AstBuilder decompiler = new AstBuilder(new DecompilerContext());
decompiler.AddAssembly(assembly); decompiler.AddAssembly(assembly);
decompiler.Transform(new Helpers.RemoveCompilerAttribute());
StringWriter output = new StringWriter(); StringWriter output = new StringWriter();
decompiler.GenerateCode(new PlainTextOutput(output)); decompiler.GenerateCode(new PlainTextOutput(output));
StringWriter diff = new StringWriter(); StringWriter diff = new StringWriter();

Loading…
Cancel
Save