Skip to content

Commit

Permalink
assert.CollectT: add Helper() method
Browse files Browse the repository at this point in the history
Add Helper() method to CollectT like testing.T as we intend to add
Helper() to the assert.TestingT interface.
  • Loading branch information
dolmen committed Oct 30, 2023
1 parent c2989f1 commit da99481
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assert/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,9 @@ type CollectT struct {
errors []error
}

// Helper is like [testing.T.Helper] but does nothing.
func (CollectT) Helper() {}

// Errorf collects the error.
func (c *CollectT) Errorf(format string, args ...interface{}) {
c.errors = append(c.errors, fmt.Errorf(format, args...))
Expand Down

0 comments on commit da99481

Please sign in to comment.