Skip to content

[Repo Assist] test: add coverage for LazyList.rev, concat, and split#249

Merged
gdziadkiewicz merged 2 commits intomasterfrom
repo-assist/test-lazylist-missing-coverage-20260314-844384911b925bc0
Mar 15, 2026
Merged

[Repo Assist] test: add coverage for LazyList.rev, concat, and split#249
gdziadkiewicz merged 2 commits intomasterfrom
repo-assist/test-lazylist-missing-coverage-20260314-844384911b925bc0

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Adds 13 unit tests for three LazyList functions that previously had no direct test coverage: rev, concat, and split.

LazyList.rev (4 tests)

  • Empty list reversal stays empty
  • Singleton list is unchanged
  • Multi-element list is reversed correctly
  • Double-reversal roundtrip (involution)

LazyList.concat (5 tests)

  • Empty outer list produces empty result
  • Inner empty lists produce empty result
  • Two/three sublists concatenate in order
  • Empty inner lists are skipped correctly

LazyList.split (4 tests)

Documents the actual semantics of this utility function: split ll n collects the first n elements of ll in reverse order as an 'T list, drops the element at index n, and returns elements from index n+1 onward as the remaining LazyList. This is the contract relied upon by BankersDeque, RealTimeDeque, and related structures for O(n) element removal.

Test Status

Passed!  - Failed: 0, Passed: 753, Skipped: 6, Total: 759

All tests pass. Code formatted with Fantomas before commit.

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.split behavior (reversed left part + dropping the element at index n).

💡 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.

@gdziadkiewicz gdziadkiewicz marked this pull request as ready for review March 15, 2026 17:41
@gdziadkiewicz gdziadkiewicz merged commit d243d49 into master Mar 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants