Browse Source

Put path to TestCases-dir into a constant.

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

4
ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs

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

4
ICSharpCode.Decompiler.Tests/DecompilerTestBase.cs

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

6
ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs

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

2
ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

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

Loading…
Cancel
Save