assert.CollectT: add Helper() method

Add Helper() method to CollectT like testing.T as we intend to add
Helper() to the assert.TestingT interface.
pull/1423/head
Olivier Mengué 2023-07-11 22:17:10 +02:00
parent c2989f188b
commit da9948136f
1 changed files with 3 additions and 0 deletions

View File

@ -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...))