Skip to content

Commit

Permalink
Merge 720c020 into e98d632
Browse files Browse the repository at this point in the history
  • Loading branch information
Orace authored Jun 27, 2023
2 parents e98d632 + 720c020 commit 65a341f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions MoreLinq.Test/SortedMergeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ public void TestSortedMergeDisposesOnError()
Throws.BreakException);
}

/// <summary>
/// Verify that SortedMerge do not call MoveNext method eagerly
/// </summary>
[Test]
public void TestSortedMergeDoNotCallMoveNextEagerly()
{
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>
/// Verify that SortedMerge throws an exception if invoked on a <c>null</c> sequence.
/// </summary>
Expand Down

0 comments on commit 65a341f

Please sign in to comment.