-
Notifications
You must be signed in to change notification settings - Fork 419
Open
Labels
Description
If the using
is removed from the following line in Backsert
:
Line 70 in ce57548
using var e = first.CountDown(index, ValueTuple.Create).GetEnumerator(); |
then its tests, like the following that uses TestingSequence
:
MoreLINQ/MoreLinq.Test/BacksertTest.cs
Lines 56 to 63 in ce57548
public IEnumerable<int> Backsert(int[] seq1, int index, int[] seq2) | |
{ | |
using (var test1 = seq1.AsTestingSequence()) | |
using (var test2 = seq2.AsTestingSequence()) | |
{ | |
return test1.Backsert(test2, index).ToArray(); | |
} | |
} |
don't break!
This is because Backsert
internally uses other operators like Concat
and CountDown
and so provide a false positive because while Backsert
is modified to not dispose anymore, Concat
and CountDown
do! This highlights a flaw that relying on TestingSequence
is weak and won't cover what it's designed to test if an implementation is refactored internally to rely on other operations. TestingSequence
is only as good as the implementation fully stand on its own.