Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
chynesNR committed Oct 16, 2024
1 parent a14adbb commit 28a5ebe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ public void ConcurrentHashSet_IsThreadSafe()
[TestCase(new[] { 10, 10, 11, 11, 12 }, new[] { true, false, true, false, true })]
public void ConcurrentHashSet_TryAdd(int[] values, bool[] results)
{
ConcurrentHashSet<int> set = new();
for (var i = 0; i < values.Length; i++)
{
var value = values[i];
var result = results[i];

Assert.That(_concurrentHashSet.TryAdd(value), Is.EqualTo(result));
Assert.That(set.TryAdd(value), Is.EqualTo(result));
}
}

Expand Down

0 comments on commit 28a5ebe

Please sign in to comment.