Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

switch to HashSet for recording inputfiles

  • Loading branch information...
commit 591c5e7525c897717606029c20c91b1e1d2a7a41 1 parent f3fc027
Lucas Meijer authored
View
2  TargetBuildInstructions.cs
@@ -11,6 +11,6 @@ public class TargetBuildInstructions
public class TargetBuildSettings
{
- public IEnumerable<string> InputFiles;
+ public HashSet<string> InputFiles;
}
}
View
4 Tests/SimpleCopyDepGraph.cs
@@ -10,7 +10,7 @@ namespace bs.Tests
class SimpleCopyDepGraph : DependencyGraphTests
{
[SetUp]
- public void Setup()
+ public new void Setup()
{
SetupSimpleCopyDepGraph();
}
@@ -66,7 +66,7 @@ private void SetupSimpleCopyDepGraph()
_depGraph.RegisterTarget(defaulttargetFile, new TargetBuildInstructions()
{
Action = (target,settings) => File.Copy(settings.InputFiles.Single(), target, true),
- Settings = new TargetBuildSettings() { InputFiles = new[] { defaultSourceFile }}
+ Settings = new TargetBuildSettings() { InputFiles = new HashSet<string>(new[]{defaultSourceFile})}
});
}
}
View
7 Tests/TargetWithoutSources.cs
@@ -1,4 +1,5 @@
-using System.IO;
+using System.Collections.Generic;
+using System.IO;
using System.Linq;
using NUnit.Framework;
@@ -7,7 +8,7 @@ namespace bs.Tests
class TargetWithoutSources : DependencyGraphTests
{
[SetUp]
- public void Setup()
+ public new void Setup()
{
SetupGraphWithOneTargetWithoutSources();
}
@@ -41,7 +42,7 @@ private void SetupGraphWithOneTargetWithoutSources()
_depGraph.RegisterTarget(defaulttargetFile, new TargetBuildInstructions()
{
Action = (target,sources) => File.WriteAllText(target, "Hello"),
- Settings = new TargetBuildSettings() { InputFiles = new string[0]}
+ Settings = new TargetBuildSettings() { InputFiles = new HashSet<string>()}
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.