Permalink
Browse files

switch to HashSet for recording inputfiles

  • Loading branch information...
1 parent f3fc027 commit 591c5e7525c897717606029c20c91b1e1d2a7a41 Lucas Meijer committed Apr 14, 2012
Showing with 7 additions and 6 deletions.
  1. +1 −1 TargetBuildInstructions.cs
  2. +2 −2 Tests/SimpleCopyDepGraph.cs
  3. +4 −3 Tests/TargetWithoutSources.cs
@@ -11,6 +11,6 @@ public class TargetBuildInstructions
public class TargetBuildSettings
{
- public IEnumerable<string> InputFiles;
+ public HashSet<string> InputFiles;
}
}
@@ -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})}
});
}
}
@@ -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>()}
});
}

0 comments on commit 591c5e7

Please sign in to comment.