Skip to content

Add itertest package to test expected iterator behavior#33

Merged
maargenton merged 4 commits intomasterfrom
maa/itertest
Feb 22, 2026
Merged

Add itertest package to test expected iterator behavior#33
maargenton merged 4 commits intomasterfrom
maa/itertest

Conversation

@maargenton
Copy link
Owner

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 itertest package with VerifySeqCanStopAfterN and VerifySeq2CanStopAfterN functions
  • 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.

@maargenton maargenton merged commit e23d97e into master Feb 22, 2026
12 checks passed
@maargenton maargenton deleted the maa/itertest branch February 22, 2026 19:22
@maargenton
Copy link
Owner Author

Released in v1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants