-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise tests to avoid using Eumerable.Range
#1044
Comments
I'll create the branch, that way we can each work on it. Honestly, they should all be |
@viceroypenguin Awesome.
PR #475 is addressing that. |
Ah, I remember this one. I used it as a foundation for some of the changes I did in SuperLinq to handle this consistency. I'll pull in the commits here and offer some additional improvements for you to decide on. I'll push something shortly. |
Created the first draft in e3c5554. This should be a good foundation to start editing the other tests to match. After review, I didn't see that much in #475 that was usable here, though there may be some overlap you see that I don't. For the first commit, I did the following:
One open problem that you can probably solve quicker than me: The various tests that use |
Starting with .NET 8,
Eumerable.Range
returns an instance of a privateRangeIterator
that implementsIList<T>
(see also dotnet/runtime#88249). A lot of the unit tests potentially went with the assumption thatEumerable.Range
returns a pure sequence. There are some operators in MoreLINQ that are optimised for sources that are collections and/or lists so tests usingEumerable.Range
may be testing those optimised paths rather than the actual intended path iterating the source as anIEnumerable<>
. Those tests need to be revised to avoidEnumerable.Range
altogether.Potential candidates that need revision:
AggregateRightTest
AggregateTest
AppendTest
AssertCountTest
AtLeastTest
AtMostTest
BacksertTest
ChooseTest
CompareCountTest
ConsumeTest
CountBetweenTest
CountByTest
CountDownTest
ExactlyTest
FlattenTest
FoldTest
GroupAdjacentTest
InsertTest
MemoizeTest
MoveTest
PadStartTest
PairwiseTest
PartitionTest
PermutationsTest
PrependTest
PreScanTest
RandomSubsetTest
RepeatTest
ScanRightTest
ScanTest
SequenceTest
ShuffleTest
SkipLastTest
SkipUntilTest
SubsetTest
TakeUntilTest
TestingSequenceTest
ToDataTableTest
TraverseTest
TrySingleTest
WindowLeftTest
WindowRightTest
The text was updated successfully, but these errors were encountered: