[Repo Assist] test: add missing side-effect and Seq-equivalence tests for sum/average#320
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
Conversation
The SideEffects module previously tested only sum, sumBy, and averageBy. This adds the 3 missing variants: - sumByAsync iterates exactly once - average iterates exactly once - averageByAsync iterates exactly once Plus 2 tests verifying side-effect sequences yield next values on re-iteration: - sum second iteration sees side-effect values - averageBy second iteration sees side-effect values Also adds 4 new Immutable Fact tests confirming results match Seq equivalents: - TaskSeq.sum matches Seq.sum - TaskSeq.average matches Seq.average - TaskSeq.sumBy matches Seq.sumBy - TaskSeq.averageBy matches Seq.averageBy Total new tests: 44 (from 28 to 72 in the SumBy module, 191 passed total in this file including Theory variants). Full suite: 4574 passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
11 tasks
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 is a draft PR from Repo Assist, an automated AI assistant.
What changed
Adds 44 new tests to
TaskSeq.SumBy.Tests.fs, which coverssum,sumBy,sumByAsync,average,averageBy, andaverageByAsync.Missing side-effect tests (3 new
[(Theory)]× variants each)The
SideEffectsmodule previously tested onlysum,sumBy, andaverageBy. The following were missing:TaskSeq-sumByAsync iterates exactly onceTaskSeq-average iterates exactly onceTaskSeq-averageByAsync iterates exactly oncePlus two tests that also verify the side-effect sequence advances on second consumption:
TaskSeq-sum second iteration sees side-effect valuesTaskSeq-averageBy second iteration sees side-effect valuesSeq-equivalence tests (4 new
[(Fact)]tests)Adds tests confirming
TaskSeqresults match the F#Seqmodule for the same input, providing a specification oracle:TaskSeq-sum result matches Seq-sumTaskSeq-average result matches Seq-averageTaskSeq-sumBy result matches Seq-sumByTaskSeq-averageBy result matches Seq-averageByAI Disclosure
This PR was created by Repo Assist, an automated AI assistant.
Test Status
✅ Build: succeeded (Release configuration)
✅ Tests: 4574 passed, 2 skipped, 0 failed (44 new tests added, up from 4530)
✅ Formatting:
dotnet fantomas . --checkpasses