-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: make collection-related matchers Go 1.23 iterator aware
- new internal helper package for dealing with Go 1.23 iterators via reflection; for Go versions before 1.23 this package provides the same helper functions as stubs instead, shielding both the matchers code base as well as their tests from any code that otherwise would not build on pre-iterator versions. This allows to keep new iterator-related matcher code and associated tests inline, hopefully ensuring good maintainability. - with the exception of ContainElements and ConsistOf, the other iterator-aware matchers do not need to go through producing all collection elements first in order to work on a slice of these elements. Instead, they directly work on the collection elements individually as their iterator produces them. - BeEmpty: iter.Seq, iter.Seq2 w/ tests - HaveLen: iter.Seq, iter.Seq2 w/ tests - HaveEach: iter.Seq, iter.Seq2 w/ tests - ContainElement: iter.Seq, iter.Seq2 w/ tests - HaveExactElements: iter.Seq, iter.Seq2 w/ tests - ContainElements: iter.Seq, iter.Seq2 w/ tests - ConsistOf: iter.Seq, iter.Seq2 w/ test - HaveKey: iter.Seq2 only w/ test - HaveKeyWithValue: iter.Seq2 only w/ test - updated documentation. Signed-off-by: thediveo <[email protected]>
- Loading branch information
Showing
25 changed files
with
1,527 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.