Browse Source

Put path to TestCases-dir into a constant.

pull/863/head
Daniel Grunwald 8 years ago
parent
commit
6305ed6e4e
  1. 2
      ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs
  2. 4
      ICSharpCode.Decompiler.Tests/DecompilerTestBase.cs
  3. 2
      ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs
  4. 2
      ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

2
ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs

@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.Tests
[TestFixture] [TestFixture]
public class CorrectnessTestRunner public class CorrectnessTestRunner
{ {
const string TestCasePath = @"../../../../ICSharpCode.Decompiler.Tests/TestCases/Correctness"; const string TestCasePath = DecompilerTestBase.TestCasePath + "/Correctness";
[Test] [Test]
public void AllFilesHaveTests() public void AllFilesHaveTests()

4
ICSharpCode.Decompiler.Tests/DecompilerTestBase.cs

@ -32,9 +32,11 @@ namespace ICSharpCode.Decompiler.Tests
{ {
public abstract class DecompilerTestBase public abstract class DecompilerTestBase
{ {
public const string TestCasePath = "../../../TestCases";
protected static void ValidateFileRoundtrip(string samplesFileName) protected static void ValidateFileRoundtrip(string samplesFileName)
{ {
var fullPath = Path.Combine(@"../../../../ICSharpCode.Decompiler.Tests", samplesFileName); var fullPath = Path.Combine(TestCasePath, "..", samplesFileName);
AssertRoundtripCode(fullPath); AssertRoundtripCode(fullPath);
} }

2
ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs

@ -12,7 +12,7 @@ namespace ICSharpCode.Decompiler.Tests
{ {
public class ILPrettyTestRunner public class ILPrettyTestRunner
{ {
const string TestCasePath = @"../../../../ICSharpCode.Decompiler.Tests/TestCases/ILPretty"; const string TestCasePath = DecompilerTestBase.TestCasePath + "/ILPretty";
[Test] [Test]
public void AllFilesHaveTests() public void AllFilesHaveTests()

2
ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.Tests
{ {
public class PrettyTestRunner public class PrettyTestRunner
{ {
const string TestCasePath = @"../../../../ICSharpCode.Decompiler.Tests/TestCases/Pretty"; const string TestCasePath = DecompilerTestBase.TestCasePath + "/Pretty";
[Test] [Test]
public void AllFilesHaveTests() public void AllFilesHaveTests()

Loading…
Cancel
Save