Conversation
Add missing test cases for TaskSeq.choose, TaskSeq.chooseAsync, TaskSeq.filter, and TaskSeq.filterAsync: choose/chooseAsync: - All Some: chooser always returns Some passes all elements through - All None: chooser always returns None yields empty - Singleton with Some/None chooser - Type-changing chooser (int -> string option) - Evaluation count: each element visited exactly once filter/filterAsync: - Keep all: predicate always true preserves all elements - Remove all: predicate always false yields empty - Evaluation count: each element visited exactly once Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8 tasks
dsyme
approved these changes
Mar 7, 2026
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
Expands test coverage for
TaskSeq.choose,TaskSeq.chooseAsync,TaskSeq.filter, andTaskSeq.filterAsync. These functions had only 7 tests each — this PR adds 8 new tests forchoose/chooseAsyncand 5 new tests forfilter/filterAsync.New tests
TaskSeq.Choose.Tests.fsSomepasses all 10 elements through (sync + async)Noneyields empty sequence (sync + async)int -> string option, exerciseschooseas a combined map+filterTaskSeq.Filter.Tests.fstruepreserves all elements (sync + async viafilter/filterAsync)falseyields empty (sync + async)Test Status
Build: ✅ succeeded (
dotnet build src/FSharp.Control.TaskSeq.sln -c Release)Tests: ✅ 169 passed, 0 failed (
dotnet test --filter "TaskSeq.Tests.Choose|TaskSeq.Tests.Filter")