morelinq/MoreLINQ

Revise tests to avoid using `Eumerable.Range`

Open

#1.044 aberto em 16 de nov. de 2023

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)C# (406 forks)batch import
Component-Testsgood first issuehelp wanted

Métricas do repositório

Stars
 (3.495 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Starting with .NET 8, Eumerable.Range returns an instance of a private RangeIterator that implements IList<T> (see also dotnet/runtime#88249). A lot of the unit tests potentially went with the assumption that Eumerable.Range returns a pure sequence. There are some operators in MoreLINQ that are optimised for sources that are collections and/or lists so tests using Eumerable.Range may be testing those optimised paths rather than the actual intended path iterating the source as an IEnumerable<>. Those tests need to be revised to avoid Enumerable.Range altogether.

Potential candidates that need revision:

Guia do colaborador