[repo-assist] tests: add coverage for ValueTask helper module - #484
Draft
github-actions[bot] wants to merge 1 commit into
Draft
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Adds direct unit tests for FSharp.Control.ValueTask functions (fromResult, ofSource, ofTask, ignore, True/False constants) and their deprecated aliases (FromResult, ofIValueTaskSource). These functions previously had no dedicated test coverage, unlike their Task/Async counterparts already exercised in Utils.Tests.fs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
What
Adds direct unit test coverage for the
FSharp.Control.ValueTaskhelper module inUtils.fs:fromResult,ofSource,ofTask,ignore, theTrue/Falseconstants,ValueTask.CompletedTask, and the deprecated aliasesFromResult/ofIValueTaskSource.Why
While investigating other work, I noticed
Utils.Tests.fshas solid coverage for theTaskandAsynchelper modules (bind,map, exception propagation, etc.) but zero direct tests for the parallelValueTaskmodule, even though it's used pervasively throughout the library and test suite (e.g.ValueTask.ofTask,ValueTask.True/Falseappear inTestUtils.fsand several test files, but only as incidental usage, not as targeted assertions on the helper functions themselves).New tests cover:
ValueTask.CompletedTask— already-completed marker valueValueTask.True/ValueTask.False— completed boolean constantsValueTask.fromResultand its deprecated aliasFromResultValueTask.ofTask— both already-completed and pending sourceTask<'T>ValueTask.ignore— discarding results from both completed and pendingValueTask<'T>, including exception propagation through the ignoredValueTaskValueTask.ofSourceand its deprecated aliasofIValueTaskSource— using a minimalIValueTaskSource<bool>test double built onManualResetValueTaskSourceCore<bool>No production code was changed; this is a test-only addition.
Test Status
dotnet build -c Release: succeeds, 0 warnings, 0 errorsdotnet fantomas . --check: passes (file reformatted withdotnet fantomasbefore commit)AI disclosure
This PR was created by Repo Assist, an automated AI assistant, as part of routine test-coverage improvement (Task 5: Coding Improvements). A human maintainer should review before merging.
Add this agentic workflow to your repo
To install this agentic workflow, run