test: cover UnzipBy3 through UnzipBy9 - #961
Open
vignesh2027 wants to merge 1 commit into
Open
Conversation
TestUnzipBy only exercised UnzipBy2, leaving UnzipBy3 through UnzipBy9 with no test coverage. Add a test for each arity following the existing TestUnzipBy style, bringing all of them to 100% coverage.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #961 +/- ##
==========================================
+ Coverage 93.64% 95.77% +2.13%
==========================================
Files 32 32
Lines 5520 5520
==========================================
+ Hits 5169 5287 +118
+ Misses 244 126 -118
Partials 107 107
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
TestUnzipByonly exercisedUnzipBy2, soUnzipBy3throughUnzipBy9had 0% test coverage (theUnzipByErr*variants are already fully tested, but the non-errorUnzipBy*arities beyond 2 were missed).This PR adds a test for each arity, following the existing
TestUnzipBystyle — a two-element input and an iteratee that transforms every field, asserting the regrouped output slices.Result
UnzipBy3–UnzipBy9each go to 100% coverage; package coverage rises from 95.2% to 98.6%.go test -run TestUnzipBy .passesgofmt,go vet, andgolangci-lintare cleanTests only — no production code changed.