[Repo Assist] test: add coverage for untested List and Array module functions#245
Conversation
Add 33 new tests covering functions in List and Array that had no test coverage: List: singleton, cons, findExactlyOne, skip, take, skipWhile, skipUntil, takeWhile, takeUntil, groupNeighboursBy, mapIf, catOptions, choice1s, choice2s, partitionChoices, equalsWith Array: nth, setAt, findExactlyOne, centralMovingAverageOfOption, catOptions, choice1s, choice2s, partitionChoices, equalsWith Total test count increases from ~710 to 743. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds unit test coverage for previously untested public functions in the FSharpx.Collections List and Array extension modules (implemented in src/FSharpx.Collections/Collections.fs), increasing confidence in their baseline behavior.
Changes:
- Add new
Listextension tests (e.g.,singleton,cons,findExactlyOne,skip/take,groupNeighboursBy,equalsWith). - Add new
Arrayextension tests (e.g.,nth,setAt,findExactlyOne,centralMovingAverageOfOption,equalsWith).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/FSharpx.Collections.Tests/ListExtensionsTest.fs | Adds unit tests covering multiple FSharpx.Collections.List public helpers. |
| tests/FSharpx.Collections.Tests/ArrayTests.fs | Adds unit tests covering multiple FSharpx.Collections.Array public helpers. |
💡 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds unit-test coverage for previously untested public functions in FSharpx.Collections’ List and Array extension modules (implemented in Collections.fs), increasing confidence in their behavior without changing production code.
Changes:
- Added unit tests for
Listhelpers (e.g.,singleton,cons,findExactlyOne,skip/take, predicate-based take/skip,groupNeighboursBy,mapIf, option/choice helpers,equalsWith). - Added unit tests for
Arrayhelpers (e.g.,nth,setAt,findExactlyOne,centralMovingAverageOfOption, option/choice helpers,equalsWith).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/FSharpx.Collections.Tests/ListExtensionsTest.fs | Adds coverage for additional FSharpx.Collections.List extension functions. |
| tests/FSharpx.Collections.Tests/ArrayTests.fs | Adds coverage for additional FSharpx.Collections.Array extension functions. |
💡 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 PR was created by Repo Assist, an automated AI assistant.
Summary
Adds 33 new unit tests covering public functions in the
ListandArraymodules (inCollections.fs) that had zero test coverage before this PR.List module — new tests
singletonconsfindExactlyOneskip/takeskipWhile/skipUntiltakeWhile/takeUntilgroupNeighboursBymapIfcatOptionschoice1s/choice2spartitionChoicesequalsWithArray module — new tests
nthsetAtfindExactlyOnecentralMovingAverageOfOptioncatOptionschoice1s/choice2spartitionChoicesequalsWithTest Status
✅ All 743 tests pass (
dotnet test—Passed: 743, Skipped: 6, Failed: 0). The 6 skipped tests are pre-existing.Up from ~710 before the recent test addition PRs. This PR adds 33 new passing tests.