Skip to content

Commit

Permalink
Update MoreLinq.Test/SortedMergeTest.cs
Browse files Browse the repository at this point in the history
Co-authored-by: Atif Aziz <[email protected]>
  • Loading branch information
Orace and atifaziz authored Jun 27, 2023
1 parent aece77c commit 720c020
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions MoreLinq.Test/SortedMergeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ public void TestSortedMergeDisposesOnError()
[Test]
public void TestSortedMergeDoNotCallMoveNextEagerly()
{
var sequenceA = TestingSequence.Of(1, 3);
var sequenceB = MoreEnumerable.From(() => 2, () => throw new TestException());
sequenceA.SortedMerge(OrderByDirection.Ascending, sequenceB).Take(2).Consume();
using var sequenceA = TestingSequence.Of(1, 3);
using var sequenceB = MoreEnumerable.From(() => 2, () => throw new TestException())
.AsTestingSequence();

var result = sequenceA.SortedMerge(OrderByDirection.Ascending, sequenceB).Take(2);

Assert.That(() => result.Consume(), Throws.Nothing);
}

/// <summary>
Expand Down

0 comments on commit 720c020

Please sign in to comment.