[Repo Assist] test: add coverage for LazyList.rev, concat, and split#249
Merged
gdziadkiewicz merged 2 commits intomasterfrom Mar 15, 2026
Conversation
Add 13 tests for three LazyList functions that had no direct test coverage: rev, concat, and split. - rev: empty, singleton, list, and involution (double-rev roundtrip) - concat: empty outer/inner lists, two/three sublists, mixed empty - split: documents the actual semantics — collects first n elements in reverse order and returns elements from index n+1 onward (element at index n is dropped), which is the contract used by BankersDeque and RealTimeDeque for O(n) element removal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
29 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds unit test coverage for previously untested LazyList operations in the FSharpx.Collections test suite, specifically targeting correctness of rev, concat, and the (non-obvious) semantics of split.
Changes:
- Add 4 tests for
LazyList.rev(empty/singleton/multi-element + involution roundtrip). - Add 5 tests for
LazyList.concat(empty outer/empty inner + ordered concatenation). - Add 4 tests documenting and validating
LazyList.splitbehavior (reversed left part + dropping the element at indexn).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Adds 13 unit tests for three
LazyListfunctions that previously had no direct test coverage:rev,concat, andsplit.LazyList.rev(4 tests)LazyList.concat(5 tests)LazyList.split(4 tests)Documents the actual semantics of this utility function:
split ll ncollects the firstnelements ofllin reverse order as an'T list, drops the element at indexn, and returns elements from indexn+1onward as the remainingLazyList. This is the contract relied upon byBankersDeque,RealTimeDeque, and related structures for O(n) element removal.Test Status
All tests pass. Code formatted with Fantomas before commit.