Add itertest package to test expected iterator behavior#33
Merged
maargenton merged 4 commits intomasterfrom Feb 22, 2026
Merged
Add itertest package to test expected iterator behavior#33maargenton merged 4 commits intomasterfrom
itertest package to test expected iterator behavior#33maargenton merged 4 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new itertest package to verify that iterator implementations correctly handle early termination (when yield() returns false). The package provides utility functions to test both iter.Seq and iter.Seq2 iterators by breaking early and checking that they don't panic.
Changes:
- Added
itertestpackage withVerifySeqCanStopAfterNandVerifySeq2CanStopAfterNfunctions - Added comprehensive tests for the new package functions
- Updated README.md with documentation for the new package and reorganized helper function documentation
- Modified CI workflow to comment out macOS 13 (amd64) testing
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| pkg/itertest/itertest.go | Implements verification functions for testing iterator early termination behavior |
| pkg/itertest/itertest_internal_test.go | Comprehensive tests for the iterator verification functions using BDD-style testing |
| README.md | Documents the new itertest package and reorganizes documentation structure |
| .github/workflows/build.yaml | Comments out macOS 13 (amd64) from CI test matrix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
Released in v1.6.0 |
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.
No description provided.