Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin committed Dec 28, 2022
1 parent 952ec04 commit c2339f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions Tests/SuperLinq.Async.Test/CountDownTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,9 @@ public void ExceptionOnNegativeCount()
AsyncSeq(1).CountDown(-1));
}

[Fact]
public Task WithNegativeCount()
{
const int count = 10;
return AsyncEnumerable.Range(1, count)
.CountDown(-1000, (_, cd) => cd)
.AssertSequenceEqual(Enumerable.Repeat((int?)null, count));
}

private static IEnumerable<T> GetData<T>(Func<int[], int, int?[], T> selector)
{
var xs = Enumerable.Range(0, 5).ToArray();
yield return selector(xs, -1, new int?[] { null, null, null, null, null });
yield return selector(xs, 0, new int?[] { null, null, null, null, null });
yield return selector(xs, 1, new int?[] { null, null, null, null, 0 });
yield return selector(xs, 2, new int?[] { null, null, null, 1, 0 });
yield return selector(xs, 3, new int?[] { null, null, 2, 1, 0 });
Expand Down
2 changes: 0 additions & 2 deletions Tests/SuperLinq.Test/CountDownTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public void ExceptionOnNegativeCount()
public static IEnumerable<T> GetData<T>(Func<int[], int, int?[], T> selector)
{
var xs = Enumerable.Range(0, 5).ToArray();
yield return selector(xs, -1, new int?[] { null, null, null, null, null });
yield return selector(xs, 0, new int?[] { null, null, null, null, null });
yield return selector(xs, 1, new int?[] { null, null, null, null, 0 });
yield return selector(xs, 2, new int?[] { null, null, null, 1, 0 });
yield return selector(xs, 3, new int?[] { null, null, 2, 1, 0 });
Expand Down

0 comments on commit c2339f5

Please sign in to comment.